| 122 | //} |
| 123 | |
| 124 | void Util::JoinString(const std::vector<std::string> &list, const std::string &delimiter, |
| 125 | std::string &out) { |
| 126 | out.clear(); |
| 127 | |
| 128 | stringstream ss; |
| 129 | |
| 130 | for (auto it = list.begin(); it != list.end(); ++it) { |
| 131 | ss << *it; |
| 132 | |
| 133 | if (it != list.end() - 1) { |
| 134 | ss << delimiter; |
| 135 | } |
| 136 | } |
| 137 | |
| 138 | out = ss.str(); |
| 139 | } |
| 140 | |
| 141 | Local <v8::FunctionTemplate> NewFunctionTemplate( |
| 142 | v8::Isolate *isolate, |