Boost logo

Boost Users :

From: Raúl Huertas (raulh39_at_[hidden])
Date: 2006-06-09 14:12:18


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.*


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net