Advertisement
Guest User

Untitled

a guest
Mar 18th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #include <sstream>
  2. #include <string>
  3.  
  4. std::vector<std::string> split(const std::string& s, char delimiter)
  5. {
  6. std::vector<std::string> tokens;
  7. std::string token;
  8. std::istringstream tokenStream(s);
  9.  
  10. while (std::getline(tokenStream, token, delimiter))
  11. {
  12. tokens.push_back(token);
  13. }
  14.  
  15. return tokens;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement