Slide 29
Slide 29 text
TextFieldBuffer
aka “StringBuilder with selection”
class TextFieldBuffer: Appendable {
val length: Int
val selection: TextRange
fun append(text: CharSequence?)
fun replace(start: Int, end: Int, text: CharSequence)
fun insert(index: Int, text: CharSequence)
fun delete(start: Int, end: Int)
fun replace(regex: Regex, text: CharSequence)
fun setSelection(range: TextRange)
fun placeCursorBeforeCharAt(offset: Int)
// lots more to come…
}