MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / builtin_string_strip

Function builtin_string_strip

src/builtin/module_builtin_string.cpp:127–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125 }
126
127 char* builtin_string_strip ( const char *str, Context * context, LineInfoArg * at ) {
128 const uint32_t strLen = stringLengthSafe ( *context, str );
129 if (!strLen)
130 return nullptr;
131 const char *start = strip_l(str);
132 const char *end = strip_r(str, strLen);
133 return end > start ? context->allocateString(start, uint32_t(end-start), at) : nullptr;
134 }
135
136 char* builtin_string_strip_left ( const char *str, Context * context, LineInfoArg * at ) {
137 const uint32_t strLen = stringLengthSafe ( *context, str );

Callers

nothing calls this directly

Calls 4

stringLengthSafeFunction · 0.85
strip_lFunction · 0.85
strip_rFunction · 0.85
allocateStringMethod · 0.80

Tested by

no test coverage detected