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

Function ltrim

include/ftg/utils/StringUtil.h:34–39  ·  view source on GitHub ↗

trim from start

Source from the content-addressed store, hash-verified

32
33// trim from start
34static inline std::string ltrim(std::string s) {
35 s.erase(s.begin(),
36 std::find_if(s.begin(), s.end(),
37 std::not1(std::ptr_fun<int, int>(std::isspace))));
38 return s;
39}
40
41// trim from end
42static inline std::string rtrim(std::string s) {

Callers 2

TESTFunction · 0.85
trimFunction · 0.85

Calls 3

find_ifFunction · 0.85
beginMethod · 0.80
endMethod · 0.80

Tested by 1

TESTFunction · 0.68