Erasing part of the string

Hello,

lets say string abc = "1000 11 1100"

How can I actually erase 11 from the string, without using string.erase since it requires position. And I don't want it to erase 11 in 1100 only 11 which is followed by a space!

Thanks in advance.
Use find() on "11 " and erase that.
Alternatively, use split+erase+join (boost has implementation of split and join, but you can just as easily write your own).
Topic archived. No new replies allowed.