| 84 | } |
| 85 | |
| 86 | inline std::vector<std::string> split_string(const std::string& s, char delim) |
| 87 | { |
| 88 | std::vector<std::string> elems; |
| 89 | std::stringstream ss(s + delim); |
| 90 | std::string item; |
| 91 | while(std::getline(ss, item, delim)) |
| 92 | { |
| 93 | elems.push_back(item); |
| 94 | } |
| 95 | return elems; |
| 96 | } |
| 97 | |
| 98 | template <class F> |
| 99 | std::string trim(const std::string& s, F f) |
no test coverage detected