| 171 | |
| 172 | template <class Container> |
| 173 | std::string join_strings(const Container& strs, char delim) { |
| 174 | std::string str; |
| 175 | |
| 176 | size_t i = 0; |
| 177 | for (auto& elem : strs) { |
| 178 | if (i > 0) { |
| 179 | str += delim; |
| 180 | } |
| 181 | |
| 182 | std::stringstream ss; |
| 183 | ss << elem; |
| 184 | str += ss.str(); |
| 185 | ++i; |
| 186 | } |
| 187 | |
| 188 | return str; |
| 189 | } |
| 190 | |
| 191 | template <class Container> |
| 192 | std::string join_strings(const Container& strs, const std::string& delim) { |