MCPcopy Create free account
hub / github.com/defold/defold / ConcatString

Function ConcatString

engine/script/src/script.cpp:2098–2105  ·  view source on GitHub ↗

Fast length limited string concatenation that assume we already point to the end of the string. Returns the new end of the string so we do not need to calculate the length of the input string or output string

Source from the content-addressed store, hash-verified

2096 // the end of the string. Returns the new end of the string so we do not need
2097 // to calculate the length of the input string or output string
2098 static char* ConcatString(char* w_ptr, const char* w_ptr_end, const char* str)
2099 {
2100 while ((w_ptr != w_ptr_end) && str && *str)
2101 {
2102 *w_ptr++ = *str++;
2103 }
2104 return w_ptr;
2105 }
2106
2107 /**
2108 * To reduce the overhead of the profiler when calling lua functions we avoid using dmSnPrintf.

Callers 1

GetProfilerStringFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected