
9 Jun
2006
9 Jun
'06
10:25 p.m.
"Raúl Huertas"
Frank escribio':
I have a string that is delimited with '|' that I want to parse with boost::tokenizer.
ie: "label 1|label2||label 3"
It all parses ok except that the whitespace within the label is removed.
Is there a way to configure the tokenizer to leave whitespace alone?
Use something like this:
boost::char_separator<char> sep("|", "", boost::keep_empty_tokens);
Look in *http://tinyurl.com/qlva6.*
I was using the char_delimiters_separator because it was required for default tokenizer<> Its appears to be working correctly now. Thanks for responding Frank