MCPcopy Create free account
hub / github.com/ColinPitrat/caprice32 / trim

Function trim

src/stringutils.cpp:21–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19 }
20
21 std::string trim(const std::string& s, char c)
22 {
23 auto b = s.begin();
24 auto e = s.end();
25 e--;
26 while(*b == c) b++;
27 while(*e == c) e--;
28 if(e++ >= b) return std::string(b, e);
29 return "";
30 }
31
32 std::string lower(const std::string& s)
33 {

Callers 2

TESTFunction · 0.85
fillSlotsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected