Tagging String positions
<p>How should I go about tagging char positions of a String?</p>

<p>For example, I have a String 'string' and changed 'str' to 'flam' to become 'flaming'. I want to tag the 'flam' part that's been replaced. What is the best way to do this in java?</p>

<p>Further Example:</p>

<p>The string starts off having no tags meaning nothing has been replaced. r is then tagged to those replaced before.</p>

<p>string -> flaming</p>

<p>------  ->  rrrr---</p>

<p>and if I continue to change</p>

<p>flaming -> flamiche</p>

<p>rrrr--- -> rrrr-rrr</p>
