String.CodePointBefore(Int32) 方法

定义

返回指定索引之前) Unicode 码位 (字符。

[Android.Runtime.Register("codePointBefore", "(I)I", "")]
public int CodePointBefore (int index);
[<Android.Runtime.Register("codePointBefore", "(I)I", "")>]
member this.CodePointBefore : int -> int

参数

index
Int32

应返回的码位后面的索引

返回

给定索引之前的 Unicode 码位值。

属性

例外

if index length()

注解

返回指定索引之前) Unicode 码位 (字符。 索引引用 char (Unicode 代码单元) 的值,范围从 1CharSequence#length() length

char如果 的值(index - 1)在低代理项范围中,(index - 2)而不是负值,并且 char at (index - 2) 的值在高代理项范围内,则返回代理项对的补充码位值。 如果 处index - 1的值char是不成对的低代理项或高代理项,则返回代理项值。

在 1.5 中添加。

java.lang.String.codePointBefore(int)Java 文档。

此页面的某些部分是基于 创建和共享的工作进行的修改,并根据 署名许可中所述的条款使用。

适用于

另请参阅

  • <xref:Java.Lang.Character.CodePointBefore(System.Char%5b%5d%2c+System.Int32%2c+System.Int32)>