Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- vector<string> tokenize(string s, string sep) {
- vector<string> r;
- char *arr = &s[0];
- for (char *tok = strtok(arr, sep.c_str()); tok; tok = strtok(NULL, sep.c_str())) {
- r.push_back(tok);
- }
- return r;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement