Boost logo

Boost Users :

From: Frank (opcode_at_[hidden])
Date: 2006-06-09 18:25:53


"Raúl Huertas" <raulh39_at_[hidden]> wrote in message
news:4489BA02.4090205_at_ya.com...
> 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


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