ltrim#

Fully qualified name: omni::extras::ltrim

Defined in omni/extras/StringHelpers.h

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

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

This will trim the characters in t from the left side of s. e.g. given s = "  asdf  " with the default t value, s would be modified to contain "asdf  ". This is effectively s.erase(0, s.find_first_not_of(t)).

Parameters:
  • s – The string to trim in-place

  • t – A string containing the list of characters to trim (such as kTrimCharsDefault)

Returns:

s for convenience