
15 Apr
2008
15 Apr
'08
2:49 p.m.
Hi, Dmitry Teslenko wrote:
Hello! For example I want to split string with single char '\t' delimeter. According to docs this can be done this way: std::vectorstd::string options; std::string sep; sep += '\t'; boost::split(options, line, boost::is_any_of(sep));
But if I want to use double tab as a delimiter? Is there an alternative to boost::is_any_of like "boost::just_what_i_say"
You can use boost::split_iterator with first_finder. Or if you prefer split-like interface, have a look at iter_split. Here is an example std::vectorstd::string options; std::string sep; sep += '\t'; boost::iter_split(options, line, boost::first_finder("\t\t")); Regards, Pavol.