Character.HighSurrogate(Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the leading surrogate (a high surrogate code unit) of the surrogate pair representing the specified supplementary character (Unicode code point) in the UTF-16 encoding.
[Android.Runtime.Register("highSurrogate", "(I)C", "")]
public static char HighSurrogate (int codePoint);
[<Android.Runtime.Register("highSurrogate", "(I)C", "")>]
static member HighSurrogate : int -> char
Parameters
- codePoint
- Int32
a supplementary character (Unicode code point)
Returns
the leading surrogate code unit used to represent the character in the UTF-16 encoding
- Attributes
Remarks
Returns the leading surrogate (a high surrogate code unit) of the surrogate pair representing the specified supplementary character (Unicode code point) in the UTF-16 encoding. If the specified character is not a supplementary character, an unspecified char
is returned.
If #isSupplementaryCodePoint isSupplementaryCodePoint(x)
is true
, then #isHighSurrogate isHighSurrogate
(highSurrogate(x))
and #toCodePoint toCodePoint
(highSurrogate(x),
#lowSurrogate lowSurrogate
(x)) == x
are also always true
.
Added in 1.7.
Java documentation for java.lang.Character.highSurrogate(int)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.