replace

fun replace(range: IntRange, text: String)

Replaces the text within the specified range with the new text.


fun replace(range: IntRange, text: String, editAction: <Error class: unknown class>.() -> Unit)

Replaces the text within the specified range with the new text and applies attributes to the newly inserted text atomically.