| 71 | }; |
| 72 | |
| 73 | void 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 | |
| 79 | std::vector<std::string> splitString(const std::string &str, const std::string &delimiter) { |
| 80 | // http://stackoverflow.com/a/13172514 |