| 490 | } |
| 491 | |
| 492 | std::string string_join(const std::vector<std::string> & values, const std::string & separator) { |
| 493 | std::ostringstream result; |
| 494 | for (size_t i = 0; i < values.size(); ++i) { |
| 495 | if (i > 0) { |
| 496 | result << separator; |
| 497 | } |
| 498 | result << values[i]; |
| 499 | } |
| 500 | return result.str(); |
| 501 | } |
| 502 | |
| 503 | std::vector<std::string> string_split(const std::string & str, const std::string & delimiter) { |
| 504 | std::vector<std::string> parts; |