String Trimming Utilities#

Functions#

std::string & omni::extras::ltrim(std::string &s, const char *t=kTrimCharsDefault)

Performs an in-place left-trim on a given string.

std::string & omni::extras::rtrim(std::string &s, const char *t=kTrimCharsDefault)

Performs an in-place right-trim on a given string.

std::string & omni::extras::trim(std::string &s, const char *t=kTrimCharsDefault)

Performs an in-place trim (from both sides) on a given string.

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.

Variables#

constexpr char omni::extras::kTrimCharsDefault

Default whitespace characters for string trimming functions.