trimCopy#
Fully qualified name: omni::extras::trimCopy
Defined in omni/extras/StringHelpers.h
- inline std::string omni::extras::trimCopy(
- std::string s,
- const char *t = kTrimCharsDefault,
Performs a trim (from both sides) on a given string, returning a copy.
This will trim the characters in
tfrom both sides ofs. e.g. givens=" asdf "with the defaulttvalue,"asdf"would be returned. This is effectivelystd::string copy(s); return trim(copy);.- Parameters:
s – The string to trim
t – A string containing the list of characters to trim (such as kTrimCharsDefault)
- Returns:
The trimmed string