Android 12 Developer Preview is here! Try it out, and give us your feedback!

DeleteSurroundingTextInCodePointsCommand

class DeleteSurroundingTextInCodePointsCommand : EditCommand
kotlin.Any
   ↳ androidx.compose.ui.text.input.DeleteSurroundingTextInCodePointsCommand

A variant of DeleteSurroundingTextCommand. The difference is that

  • The lengths are supplied in code points, not in chars.
  • This command does nothing if there are one or more invalid surrogate pairs in the requested range.

Summary

Public constructors
<init>(lengthBeforeCursor: Int, lengthAfterCursor: Int)

A variant of DeleteSurroundingTextCommand.

Public methods
Unit

Apply the command on the editing buffer.

Boolean
equals(other: Any?)

Int

String

Properties
Int

The number of characters in Unicode code points after the cursor to be deleted.

Int

The number of characters in Unicode code points before the cursor to be deleted.

Public constructors

<init>

DeleteSurroundingTextInCodePointsCommand(
    lengthBeforeCursor: Int,
    lengthAfterCursor: Int)

A variant of DeleteSurroundingTextCommand. The difference is that

  • The lengths are supplied in code points, not in chars.
  • This command does nothing if there are one or more invalid surrogate pairs in the requested range.

Public methods

applyTo

fun applyTo(buffer: EditingBuffer): Unit

Apply the command on the editing buffer.

equals

fun equals(other: Any?): Boolean

hashCode

fun hashCode(): Int

toString

fun toString(): String

Properties

lengthAfterCursor

val lengthAfterCursor: Int

The number of characters in Unicode code points after the cursor to be deleted.

lengthBeforeCursor

val lengthBeforeCursor: Int

The number of characters in Unicode code points before the cursor to be deleted.