Function

insert

Insert text at the given index in this value.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free

insert

Common
fun TextFieldBuffer.insert(index: Int, text: String)

Insert text at the given index in this value. Pass 0 to insert text at the beginning of this buffer, and pass TextFieldBuffer.length to insert text at the end of this buffer.

This is equivalent to calling replace(index, index, text).

Parameters

index The character offset at which to insert text.
text The text to insert.