string implode()

in cpp/src/parse.cpp [33:45]


string implode(const vector<string> &vec, const string &glue) {
  string res;
  int n = 0;
  for (const auto &str : vec) {
    if (n == 0) {
      res = str;
    } else {
      res += glue + str;
    }
    n++;
  }
  return res;
}