trim#
Fully qualified name: omni::extras::trim
Defined in omni/extras/StringHelpers.h
- inline std::string &omni::extras::trim(
- std::string &s,
- const char *t = kTrimCharsDefault,
Performs an in-place trim (from both sides) on a given string.
This will trim the characters in
tfrom both sides ofs. e.g. givens=" asdf "with the defaulttvalue,swould be modified to contain"asdf". This is effectivelyltrim(rtrim(s, t), t).See also
- Parameters:
s – The string to trim in-place
t – A string containing the list of characters to trim (such as kTrimCharsDefault)
- Returns:
sfor convenience