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

Function String_Append

src/String.c:151–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149
150
151void String_Append(cc_string* str, char c) {
152 /* MSVC in debug mode will initialise all variables on the stack with 0xCC by default */
153 /* So if a string is being passed with CC in all its fields, then it's probably invalid */
154#if _MSC_VER && _DEBUG
155 if (str->length == 0xCCCC && str->capacity == 0xCCCC)
156 Process_Abort("String must be initialised before calling String_Append");
157#endif
158
159 if (str->length == str->capacity) return;
160 str->buffer[str->length++] = c;
161}
162
163void String_AppendBool(cc_string* str, cc_bool value) {
164 String_AppendConst(str, value ? "True" : "False");

Callers 15

UnhandledFilterFunction · 0.85
Platform_DecodePathFunction · 0.85
Directory_EnumFunction · 0.85
Platform_EncryptFunction · 0.85
Platform_DecryptFunction · 0.85
Platform_DecodePathFunction · 0.85
Directory_EnumFunction · 0.85
Platform_EncryptFunction · 0.85
Platform_DecryptFunction · 0.85
HttpUrl_EncodeUrlFunction · 0.85
HttpUrl_ParseFunction · 0.85
HttpClient_ProcessFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected