MCPcopy Create free account
hub / github.com/MaskRay/ccls / trimInPlace

Function trimInPlace

src/test.cc:73–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71};
72
73void trimInPlace(std::string &s) {
74 auto f = [](char c) { return !isspace(c); };
75 s.erase(s.begin(), std::find_if(s.begin(), s.end(), f));
76 s.erase(std::find_if(s.rbegin(), s.rend(), f).base(), s.end());
77}
78
79std::vector<std::string> splitString(const std::string &str, const std::string &delimiter) {
80 // http://stackoverflow.com/a/13172514

Callers

nothing calls this directly

Calls 2

beginMethod · 0.80
endMethod · 0.80

Tested by

no test coverage detected