語言

Character.HighSurrogate(Int32) 方法

定義

回傳替代字元對代表 UTF-16 編碼中指定的補充字元(Unicode 代碼點)。

[Android.Runtime.Register("highSurrogate", "(I)C", "")]
public static char HighSurrogate(int codePoint);
[<Android.Runtime.Register("highSurrogate", "(I)C", "")>]
static member HighSurrogate : int -> char

參數

codePoint
Int32

一個補充字元(Unicode 代碼點)

傳回

在 UTF-16 編碼中,代表字元的首位替代碼單元

屬性

備註

回傳代表 UTF-16 編碼中指定補充字元(Unicode 代碼點)的代理對的首位代理(高階代理碼單元)。 若指定字元非補充字元,則回傳未指定 char 字元。

若 #isSupplementaryCodePoint isSupplementaryCodePoint(x) ,true則 #isHighSurrogate isHighSurrogate(highSurrogate(x)) 和 #toCodePoint toCodePoint(highSurrogate(x),#lowSurrogate lowSurrogate(x)) == x 也總是 。true

在 1.7 版本中加入。

的 java.lang.Character.highSurrogate(int)Java 檔。

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於