Function type declaration for UText.replace().
Replace a range of the original text with a replacement text.
Leaves the current iteration position at the position following the newly inserted replacement text.
This function need only be implemented on UText types that support writing.
When using this function, there should be only a single UText opened onto the underlying native text string. The function is responsible for updating the text chunk within the UText to reflect the updated iteration position, taking into account any changes to the underlying string's structure caused by the replace operation.