Class

DeleteSurroundingTextCommand

Delete lengthBeforeCursor characters of text before the current cursor position, and delete lengthAfterCursor characters of text after the current cursor position, excluding the selection.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free
Common
class DeleteSurroundingTextCommand(val lengthBeforeCursor: Int, val lengthAfterCursor: Int) :
    EditCommand

Delete lengthBeforeCursor characters of text before the current cursor position, and delete lengthAfterCursor characters of text after the current cursor position, excluding the selection.

Before and after refer to the order of the characters in the string, not to their visual representation.

See deleteSurroundingText).

Parameters

lengthBeforeCursor The number of characters in UTF-16 before the cursor to be deleted. Must be non-negative.
lengthAfterCursor The number of characters in UTF-16 after the cursor to be deleted. Must be non-negative.