Is it possible to retrieve blank strings with boost::tokenizer?

4 Sep
2002
4 Sep
'02
6:03 p.m.
For example, using the code: string line = "\taaa\t\tbbb\t"; typedef tokenizer<char_separator<char> > tok; char_separator<char> sep("\t"); tok tokens(line, sep); for(tok::iterator i = tokens.begin();i!=tokens.end();++i) { cout << "\t\"" << *i << "\"" << endl; } I get this output: "aaa" "bbb" I want to get this output: "" "aaa" "" "bbb" ""

5 Sep
5 Sep
8:47 a.m.
char_separator<char> sep("\t", "", keep_empty_tokens); should do the trick. HTH, Markus
8311
Age (days ago)
8312
Last active (days ago)
1 comments
2 participants
participants (2)
-
Markus Schöpflin
-
Sean Shubin