Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- std::vector<std::string> tokenize(const std::string &_line,const char *_delimeter)
- {
- std::vector<std::string> Tokens;
- if(_line.empty()) return Tokens;
- std::string str;
- BOOST_FOREACH(char c,_line){
- if(c==*_delimeter)
- {
- Tokens.push_back(str);
- str.clear();
- continue;
- }
- str += c;
- }
- if(!str.empty())
- Tokens.push_back(str);
- return Tokens;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement