This is probably very simple as soon as I see an example, but how to generalize boost :: tokenizer or boost :: split to work with separators consisting of more than one character?
For example, with "__", none of these standard separation solutions work:
boost::tokenizer<boost::escaped_list_separator<string> > tk(myString, boost::escaped_list_separator<string>("", "____", "\"")); std::vector<string> result; for (string tmpString : tk) { result.push_back(tmpString); }
or
boost::split(result, myString, "___");
source share