Function

insert

Insert text at the given index in this value.

insert

Source set: Common
public 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.
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: