trim from start
| 32 | |
| 33 | // trim from start |
| 34 | static 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 |
| 42 | static inline std::string rtrim(std::string s) { |