Partager via


Character.IsSurrogate(Char) Method

Definition

Determines if the given char value is a Unicode surrogate code unit.

[Android.Runtime.Register("isSurrogate", "(C)Z", "")]
public static bool IsSurrogate (char ch);
[<Android.Runtime.Register("isSurrogate", "(C)Z", "")>]
static member IsSurrogate : char -> bool

Parameters

ch
Char

the char value to be tested.

Returns

true if the char value is between #MIN_SURROGATE and #MAX_SURROGATE inclusive; false otherwise.

Attributes

Remarks

Determines if the given char value is a Unicode surrogate code unit.

Such values do not represent characters by themselves, but are used in the representation of supplementary characters in the UTF-16 encoding.

A char value is a surrogate code unit if and only if it is either a #isLowSurrogate(char) low-surrogate code unit or a #isHighSurrogate(char) high-surrogate code unit.

Added in 1.7.

Java documentation for java.lang.Character.isSurrogate(char).

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.

Applies to