MCPcopy Create free account
hub / github.com/Samsung/UTopia / rtrim

Function rtrim

include/ftg/utils/StringUtil.h:42–48  ·  view source on GitHub ↗

trim from end

Source from the content-addressed store, hash-verified

40
41// trim from end
42static inline std::string rtrim(std::string s) {
43 s.erase(std::find_if(s.rbegin(), s.rend(),
44 std::not1(std::ptr_fun<int, int>(std::isspace)))
45 .base(),
46 s.end());
47 return s;
48}
49
50// trim from both ends
51static inline std::string trim(std::string s) {

Callers 2

TESTFunction · 0.85
trimFunction · 0.85

Calls 2

find_ifFunction · 0.85
endMethod · 0.80

Tested by 1

TESTFunction · 0.68