| 39 | } |
| 40 | |
| 41 | int String_CopyToRaw(char* dst, int capacity, const cc_string* src) { |
| 42 | int i, len = min(capacity, src->length); |
| 43 | for (i = 0; i < len; i++) { dst[i] = src->buffer[i]; } |
| 44 | |
| 45 | /* add \0 to mark end of used portion of buffer */ |
| 46 | if (len < capacity) dst[len] = '\0'; |
| 47 | return len; |
| 48 | } |
| 49 | |
| 50 | cc_string String_UNSAFE_Substring(STRING_REF const cc_string* str, int offset, int length) { |
| 51 | if (offset < 0 || offset > str->length) { |
no outgoing calls
no test coverage detected