| 20 | namespace base { |
| 21 | |
| 22 | std::vector<std::string> split(const std::string& original, char delimiter) |
| 23 | { |
| 24 | std::vector<std::string> output; |
| 25 | std::string::size_type prevPos = 0, pos = 0; |
| 26 | |
| 27 | while ((pos = original.find(delimiter, pos)) != std::string::npos) { |
| 28 | output.emplace_back(original.substr(prevPos, pos - prevPos)); |
| 29 | prevPos = ++pos; |
| 30 | } |
| 31 | output.emplace_back(original.substr(prevPos, pos - prevPos)); |
| 32 | |
| 33 | return output; |
| 34 | } |
| 35 | |
| 36 | std::string string_to_lower(const std::string& original) |
| 37 | { |
no outgoing calls
no test coverage detected