MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / removeTrailingWhitespace

Function removeTrailingWhitespace

Source/Falcor/Utils/StringUtils.cpp:125–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123}
124
125std::string removeTrailingWhitespace(const std::string& str, const char* whitespace)
126{
127 std::string result(str);
128 result.erase(result.find_last_not_of(whitespace) + 1);
129 return result;
130}
131
132std::string removeLeadingTrailingWhitespace(const std::string& str, const char* whitespace)
133{

Callers 2

CPU_TESTFunction · 0.85

Calls 1

eraseMethod · 0.80

Tested by 1

CPU_TESTFunction · 0.68