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

Function String_UNSAFE_SplitBy

src/String.c:91–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91void String_UNSAFE_SplitBy(STRING_REF cc_string* str, char c, cc_string* part) {
92 int idx = String_IndexOf(str, c);
93 if (idx == -1) {
94 *part = *str;
95 *str = String_Empty;
96 } else {
97 *part = String_UNSAFE_Substring(str, 0, idx); idx++;
98 *str = String_UNSAFE_SubstringAt(str, idx);
99 }
100}
101
102int String_UNSAFE_Separate(STRING_REF const cc_string* str, char c, cc_string* key, cc_string* value) {
103 int idx = String_IndexOf(str, c);

Callers 4

X11Textbox_MeasureFunction · 0.85
X11Textbox_DrawFunction · 0.85
Game_WarnFuncFunction · 0.85
GpuInfoCommand_ExecuteFunction · 0.85

Calls 2

String_UNSAFE_SubstringFunction · 0.85

Tested by

no test coverage detected