setSelectionRange

fun setSelectionRange(start: Int?, end: Int?, direction: TextFieldSelectionDirection? = null)(source)

Sets the start and end positions of a selection in the text field.

https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange