Advertisement
Guest User

Untitled

a guest
Jan 17th, 2019
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. #include <string>
  4. using namespace std;
  5. std::string join(const std::vector<std::string>& tokens, char delimiter) {
  6. string ans = tokens[0];
  7. for (int i = 1; i < tokens.size(); ++i) {
  8. ans = ans + delimiter + tokens[i];
  9. }
  10. return ans;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement