trim from start (in place)
| 192 | |
| 193 | // trim from start (in place) |
| 194 | static inline void ltrim(std::string &s) { |
| 195 | s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](int ch) { |
| 196 | return !std::isspace(ch); |
| 197 | })); |
| 198 | } |
| 199 | |
| 200 | // trim from end (in place) |
| 201 | static inline void rtrim(std::string &s) { |
no test coverage detected