The original version of the app that I wrote on Tuesday treated strings as lists of chars and simply inserted the abbreviation objects directly into the lists in the place of the character sequence to be replaced. This had the desired effect but the math was laborious, as you ended up after only a single pass with heterogeneous lists, that had to be traversed, broken up into two lists—one for chars and one for objects—which were then worked upon separately, and finally recombined.