ditto-lib / live.ditto / DittoMutableDocumentPath / replaceText

replaceText

fun replaceText(index: Int, length: Int, newText: String): Unit

Replace the text at the document's key defined by the preceding subscripting. This will only succeed if the value at the subscripting-defined key is a string value.

Parameters

index - the character index in the existing string that you want the update to start from.

length - the number of characters that you want to replace as part of the operation.

newText - the new text to be added to the existing string.