MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / String_UNSAFE_SubstringAt

Function String_UNSAFE_SubstringAt

src/String.c:63–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63cc_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
73int String_UNSAFE_Split(STRING_REF const cc_string* str, char c, cc_string* subs, int maxSubs) {
74 int beg = 0, end, count, i;

Callers 15

Platform_NextArgFunction · 0.85
Platform_NextArgFunction · 0.85
HttpUrl_ParseFunction · 0.85
ExtractHostPortFunction · 0.85
SkipRangeFunction · 0.85
Platform_EncodePathFunction · 0.85
Options_UNSAFE_GetFunction · 0.85
Soundboard_LoadFunction · 0.85
Utils_UNSAFE_GetFilenameFunction · 0.85
String_UNSAFE_SplitByFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected