String.CodePointAt(Int32) 方法

定义

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

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

参数

index
Int32

值的索引char

返回

字符在 上的代码点值 index

属性

例外

if index = length()

注解

返回指定索引处) Unicode 码位 (字符。 索引引用char从 到) (Unicode 代码单元0#length()- 1的值。

char如果在给定索引处指定的值在高代理项范围内,则以下索引小于此 String的长度,并且char以下索引处的值处于低代理项范围,则返回与此代理项对对应的补充代码点。 否则, char 返回给定索引处的值。

在 1.5 中添加。

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

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

适用于

另请参阅

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