MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenColorIO / RightTrim

Function RightTrim

src/utils/StringUtils.h:129–134  ·  view source on GitHub ↗

Starting from the right, trim the character.

Source from the content-addressed store, hash-verified

127
128// Starting from the right, trim the character.
129inline std::string RightTrim(std::string str, char c)
130{
131 const auto it = std::find_if(str.rbegin(), str.rend(), [&c](char ch) { return c!=ch; });
132 str.erase(it.base(), str.end());
133 return str;
134}
135
136// Starting from the right, trim all the space characters i.e. space, tabulation, etc.
137inline std::string RightTrim(std::string str)

Callers 6

TrimFunction · 0.85
GetAbsoluteSearchPathsFunction · 0.85
LogMessageFunction · 0.85
loadConfigMethod · 0.85
OCIO_ADD_TESTFunction · 0.85
OCIO_ADD_TESTFunction · 0.85

Calls 5

rbeginMethod · 0.80
rendMethod · 0.80
eraseMethod · 0.80
IsSpaceFunction · 0.70
endMethod · 0.45

Tested by 2

OCIO_ADD_TESTFunction · 0.68
OCIO_ADD_TESTFunction · 0.68