MCPcopy Create free account
hub / github.com/VitalAudio/visage / trim

Method trim

visage_utils/string_utils.h:391–399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

389 }
390
391 String trim() const {
392 size_t start = string_.find_first_not_of(U" \t\n\r");
393 size_t end = string_.find_last_not_of(U" \t\n\r");
394
395 if (start == std::u32string::npos || end == std::u32string::npos)
396 return "";
397
398 return string_.substr(start, end - start + 1);
399 }
400
401 private:
402 std::u32string string_;

Callers 5

setTextEditorBoundsMethod · 0.80
preprocessWebGlShaderFunction · 0.80
processEventMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected