语言

InputConnectionWrapper.DeleteSurroundingTextInCodePoints(Int32, Int32) 方法

定义

deleteSurroundingText(int,int)的变体。

[Android.Runtime.Register("deleteSurroundingTextInCodePoints", "(II)Z", "GetDeleteSurroundingTextInCodePoints_IIHandler", ApiSince=24)]
public virtual bool DeleteSurroundingTextInCodePoints(int beforeLength, int afterLength);
[<Android.Runtime.Register("deleteSurroundingTextInCodePoints", "(II)Z", "GetDeleteSurroundingTextInCodePoints_IIHandler", ApiSince=24)>]
abstract member DeleteSurroundingTextInCodePoints : int * int -> bool
override this.DeleteSurroundingTextInCodePoints : int * int -> bool

参数

beforeLength
Int32

要删除的游标之前的字符数,以代码点表示。 如果这大于文本开头和游标之间的现有字符数,则此方法不会失败,而是删除该范围中的所有字符。

afterLength
Int32

要删除的游标后的字符数(以代码点为单位)。 如果这大于光标和文本末尾之间的现有字符数,则此方法不会失败,而是删除该区域中的所有字符。

返回

目标连接返回的值。

实现

特性

注解

deleteSurroundingText(int,int)的变体。 主要区别是:长度以代码点提供,而不是Java字符或字形;如果请求的范围中有一个或多个无效代理项对,则此方法不执行任何操作。

Java文档android.view.inputmethod.InputConnectionWrapper.deleteSurroundingTextInCodePoints(int, int)。

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于