| 61 | } |
| 62 | |
| 63 | cc_string String_UNSAFE_SubstringAt(STRING_REF const cc_string* str, int offset) { |
| 64 | cc_string sub; |
| 65 | if (offset < 0 || offset > str->length) Process_Abort("Sub offset out of range"); |
| 66 | |
| 67 | sub.buffer = str->buffer + offset; |
| 68 | sub.length = str->length - offset; |
| 69 | sub.capacity = str->length - offset; /* str->length to match String_UNSAFE_Substring */ |
| 70 | return sub; |
| 71 | } |
| 72 | |
| 73 | int String_UNSAFE_Split(STRING_REF const cc_string* str, char c, cc_string* subs, int maxSubs) { |
| 74 | int beg = 0, end, count, i; |
no outgoing calls
no test coverage detected