Programming idiom to parse a string in multiple-passes
I'm working on a Braille translation library, and I need to translate a string of text into braille.  I plan to do this in multiple passes, but I need a way to keep track of which parts of the string have been translated and which have not, so I don't retranslate them.

I could always create a class which would track the ranges of positions in the string which had been processed, and then design my search/replace algorithm to ignore them on subsequent passes, but I'm wondering if there isn't a more elegant way to accomplish the same thing.  

I would imagine that multi-pass string translation isn't all that uncommon, I'm just not sure what the options are for doing it.
Programming idiom to parse a string in multiple-passes
===

I'm working on a Braille translation library, and I need to translate a string of text into braille.  I plan to do this in multiple passes, but I need a way to keep track of which parts of the string have been translated and which have not, so I don't retranslate them.

I could always create a class which would track the ranges of positions in the string which had been processed, and then design my search/replace algorithm to ignore them on subsequent passes, but I'm wondering if there isn't a more elegant way to accomplish the same thing.  

I would imagine that multi-pass string translation isn't all that uncommon, I'm just not sure what the options are for doing it.