Record type for replacement information: (start index, new text).
typedef ReplacementInfo = (int start, String newText);