I\'ve been looking boost::tokenizer, and I\'ve found that the documentation is very thin. Is it possible to make it tokenize a string such as \"dolphin--monkey--baboon\" and
One option is to try boost::regex. Not sure of the performance compared to a custom tokenizer.
std::string s = "dolphin--monkey--baboon";
boost::regex re("[a-z|A-Z]+|--");
boost::sregex_token_iterator iter(s.begin(), s.end() , re, 0);
boost::sregex_token_iterator end_iter;
while(iter != end_iter)
{
std::cout << *iter << '\n';
++iter;
}