| 72 | |
| 73 | template <class Strings> |
| 74 | inline std::string join_strings(Strings strings, const std::string& delim) |
| 75 | { |
| 76 | auto it = strings.begin(); |
| 77 | if(it == strings.end()) |
| 78 | return ""; |
| 79 | |
| 80 | auto nit = std::next(it); |
| 81 | return std::accumulate(nit, strings.end(), *it, [&](std::string x, std::string y) { |
| 82 | return std::move(x) + delim + std::move(y); |
| 83 | }); |
| 84 | } |
| 85 | |
| 86 | inline std::vector<std::string> split_string(const std::string& s, char delim) |
| 87 | { |
no test coverage detected