
28 Apr
2010
28 Apr
'10
6:24 p.m.
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.