Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <sstream>
- #include <string>
- std::vector<std::string> split(const std::string& s, char delimiter)
- {
- std::vector<std::string> tokens;
- std::string token;
- std::istringstream tokenStream(s);
- while (std::getline(tokenStream, token, delimiter))
- {
- tokens.push_back(token);
- }
- return tokens;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement