Boost logo

Boost Users :

Subject: Re: [Boost-users] How do you use the find_iterator to do in-place replacements?
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2010-04-28 05:35:56


Mathias Gaunard a écrit :
> G S a écrit :
>> Hi all.
>>
>> I have the split_iterator working as intended on a string, but I don't
>> see how to use the range it returns to change the string directly
>> without copying it. For example, I want to do an erase_all on a
>> range, but that function won't take a range.
>
> The first argument is a container you want to erase the subrange from,
> and the second argument is the subrange in question that you want to erase.

Err ignore this, I had badly read the docs.
erase_all will erase all subranges of the input string that are equal to
the passed range.

To erase a specific subrange, simply use the erase member function of
your container.


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