Character.ToChars 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
ToChars(Int32, Char[], Int32) |
将指定的字符 (Unicode 码位) 转换为其 UTF-16 表示形式。 |
ToChars(Int32) |
将指定的字符 (Unicode 码位) 转换为存储在数组中的 |
ToChars(Int32, Char[], Int32)
将指定的字符 (Unicode 码位) 转换为其 UTF-16 表示形式。
[Android.Runtime.Register("toChars", "(I[CI)I", "")]
public static int ToChars (int codePoint, char[]? dst, int dstIndex);
[<Android.Runtime.Register("toChars", "(I[CI)I", "")>]
static member ToChars : int * char[] * int -> int
参数
- codePoint
- Int32
要转换的 Unicode 码位 (字符) 。
- dst
- Char[]
一个 数组 char
, codePoint
其中存储 了 的 UTF-16 值。
- dstIndex
- Int32
开始索引到 dst
存储转换值的数组中。
返回
如果码位是 BMP 码位,则为 1;如果码位是补充码位,则为 2。
- 属性
例外
如果 codePoint
不是有效的码位,则为 。
如果 为 ,则null
为 dst
。
如果 dstIndex
为负值,则大于或等于 dst.length
或等于 dst.length - 1
时 codePoint
为 IsSupplementaryCodePoint(Int32)。
注解
将指定的字符 (Unicode 码位) 转换为其 UTF-16 表示形式。 如果指定的码位是 BMP (基本多语言平面或平面 0) 值,则相同的值存储在 中 dst[dstIndex]
,并返回 1。 如果指定的码位是补充字符,则其代理值存储在 dst[dstIndex]
(高代理项) 中, dst[dstIndex+1]
(低代理项) ,并返回 2。
在 1.5 中添加。
的 java.lang.Character.toChars(int, char[], int)
Java 文档。
此页面的部分内容是基于 创建和共享的工作进行的修改,并根据 署名许可中所述的术语使用。
适用于
ToChars(Int32)
将指定的字符 (Unicode 码位) 转换为存储在数组中的 char
UTF-16 表示形式。
[Android.Runtime.Register("toChars", "(I)[C", "")]
public static char[]? ToChars (int codePoint);
[<Android.Runtime.Register("toChars", "(I)[C", "")>]
static member ToChars : int -> char[]
参数
- codePoint
- Int32
Unicode 码位
返回
具有 char
codePoint
的 UTF-16 表示形式的数组。
- 属性
例外
如果 codePoint
不是有效的码位,则为 。
注解
将指定的字符 (Unicode 码位) 转换为存储在数组中的 char
UTF-16 表示形式。 如果指定的码位是 BMP (基本多语言平面或平面 0) 值,则生成的 char
数组具有与 相同的值 codePoint
。 如果指定的码位是补充码位,则生成的 char
数组具有相应的代理项对。
在 1.5 中添加。
的 java.lang.Character.toChars(int)
Java 文档。
此页面的部分内容是基于 创建和共享的工作进行的修改,并根据 署名许可中所述的术语使用。