Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <string>
- using namespace std;
- std::string join(const std::vector<std::string>& tokens, char delimiter) {
- string ans = tokens[0];
- for (int i = 1; i < tokens.size(); ++i) {
- ans = ans + delimiter + tokens[i];
- }
- return ans;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement