Posts: 39
Location: Aachen, Germany
|
I want to mark certain positions in the string and modify it later at these exact positions. The question is simply how I can work on one position, expand and thereby increasing the stringlength, while still keeping the other positions? If I simply cut the string into two pices and then join them after modifications my iterators still won't point at the right place. Again, if I modify them and insert the first substring into the large string I will lose all the other positions. So the question is how to keep these nice iterators in place or at least how to correct them.
I was thinking an iterator is something like a counter, so it would point at position 7. If I insert something into the string that is 5 chars long the 7th position won't be what I want anymore. However, if I add 5 to the 7 I should end up where I wanted to be. At least that's what I'm thinking right now but I have no clue if this is just the least bit correct.
|