28 Apr
2010
28 Apr
'10
9:35 a.m.
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.