| 1 | #include "globals.h" |
| 2 | |
| 3 | static void _split(const std::string& s, char delim, |
| 4 | std::vector<std::string>& elems) { |
| 5 | std::stringstream ss(s); |
| 6 | std::string item; |
| 7 | |
| 8 | while (std::getline(ss, item, delim)) { |
| 9 | elems.push_back(item); |
| 10 | } |
| 11 | } |
| 12 | |
| 13 | std::vector<std::string> split(const std::string& s, char delim) { |
| 14 | std::vector<std::string> elems; |