MCPcopy Create free account
hub / github.com/Alexays/Waybar / ltrim

Function ltrim

include/util/string.hpp:8–11  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6const std::string WHITESPACE = " \n\r\t\f\v";
7
8inline std::string ltrim(const std::string& s) {
9 size_t begin = s.find_first_not_of(WHITESPACE);
10 return (begin == std::string::npos) ? "" : s.substr(begin);
11}
12
13inline std::string rtrim(const std::string& s) {
14 size_t end = s.find_last_not_of(WHITESPACE);

Callers 1

trimFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected