|
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 14:24:50
G S wrote:
> Thanks, Mathias, but I don't want to erase the entire range. I want to
> replace all the occurrences of a specific character in that range.
>
> For example, I have a line of text where some sections fall between
> quotes. I want to replace all commas within these quoted sections. I
> can find the quoted sections with split_iterator, but none of Boost's
> replacement functions seem to take a range (which I find a little
> surprising).
replace_range(your_container, your_comma_range,
what_you_want_to_put_instead)
Use find_iterator to get all your_comma_ranges.
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