UnicodeCharacters UnicodeCharacters UnicodeCharacters UnicodeCharacters Class

Definition

Provides a way for apps to get information about Unicode characters, per the Unicode Standard Annex #44.

public : static class UnicodeCharacterspublic static class UnicodeCharactersPublic Static Class UnicodeCharacters// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

Use GetCodepointFromSurrogatePair to prepare Unicode characters before you pass them to any of the other methods of this class, in order to properly process supplementary characters. See Surrogates and Supplementary Characters for a discussion of supplementary Unicode characters.

The normal procedure for processing the code points in a stream is to:

  1. Use IsHighSurrogate to determine if a code point is a high surrogate.
  2. If it is not, pass it to the desired method of UnicodeCharacters.
  3. Else the code point is a high surrogate:1. Use IsLowSurrogate to check the next code point in the stream to determine if it is a low surrogate.
  4. If it is not, you have an invalid sequence of code points.
  5. Else the second code point is a low surrogate. Pass the high and low pair to GetCodepointFromSurrogatePair to obtain the supplementary Unicode character that can be passed on to the desired method.

The methods in this class throw an invalid argument exception if the input is not a valid codepoint.

Methods

GetCodepointFromSurrogatePair(UInt32, UInt32) GetCodepointFromSurrogatePair(UInt32, UInt32) GetCodepointFromSurrogatePair(UInt32, UInt32) GetCodepointFromSurrogatePair(UInt32, UInt32)

Returns the supplementary Unicode character for the specified high and low surrogate pair.

public : static unsigned int GetCodepointFromSurrogatePair(unsigned int highSurrogate, unsigned int lowSurrogate)public static uint GetCodepointFromSurrogatePair(UInt32 highSurrogate, UInt32 lowSurrogate)Public Static Function GetCodepointFromSurrogatePair(highSurrogate As UInt32, lowSurrogate As UInt32) As uint// You can use this method in JavaScript.
Parameters
highSurrogate
unsigned int UInt32 UInt32 UInt32

The high surrogate value. This must be in the proper range: 0xD800 <= highSurrogate <= 0xDBFF.

lowSurrogate
unsigned int UInt32 UInt32 UInt32

The low surrogate value. This must be in the proper range: 0xDC00 <= lowSurrogate <= 0xDFFF.

Returns
unsigned int uint uint uint

The supplementary Unicode character.

See Also

GetGeneralCategory(UInt32) GetGeneralCategory(UInt32) GetGeneralCategory(UInt32) GetGeneralCategory(UInt32)

Returns the UnicodeGeneralCategory of the specified Unicode character.

public : static UnicodeGeneralCategory GetGeneralCategory(unsigned int codepoint)public static UnicodeGeneralCategory GetGeneralCategory(UInt32 codepoint)Public Static Function GetGeneralCategory(codepoint As UInt32) As UnicodeGeneralCategory// You can use this method in JavaScript.
Parameters
codepoint
unsigned int UInt32 UInt32 UInt32

A Unicode character. This must be in the proper range: 0 <= codepoint <= 0x10FFFF.

Returns
See Also

GetNumericType(UInt32) GetNumericType(UInt32) GetNumericType(UInt32) GetNumericType(UInt32)

Returns the UnicodeNumericType of the specified Unicode character.

public : static UnicodeNumericType GetNumericType(unsigned int codepoint)public static UnicodeNumericType GetNumericType(UInt32 codepoint)Public Static Function GetNumericType(codepoint As UInt32) As UnicodeNumericType// You can use this method in JavaScript.
Parameters
codepoint
unsigned int UInt32 UInt32 UInt32

A Unicode character. This must be in the proper range: 0 <= codepoint <= 0x10FFFF.

Returns
See Also

GetSurrogatePairFromCodepoint(UInt32, Char, Char) GetSurrogatePairFromCodepoint(UInt32, Char, Char) GetSurrogatePairFromCodepoint(UInt32, Char, Char) GetSurrogatePairFromCodepoint(UInt32, Char, Char)

Returns the high and low surrogate pair values for the specified supplementary Unicode character.

public : static void GetSurrogatePairFromCodepoint(unsigned int codepoint, Char highSurrogate, Char lowSurrogate)public static void GetSurrogatePairFromCodepoint(UInt32 codepoint, Char highSurrogate, Char lowSurrogate)Public Static Function GetSurrogatePairFromCodepoint(codepoint As UInt32, highSurrogate As Char, lowSurrogate As Char) As void// You can use this method in JavaScript.
Parameters
codepoint
unsigned int UInt32 UInt32 UInt32

A Unicode character. This must be in the proper range: 0 <= codepoint <= 0x10FFFF.

highSurrogate
Char Char Char Char

The high surrogate value returned.

lowSurrogate
Char Char Char Char

The low surrogate value returned.

Remarks

See Surrogates and Supplementary Characters for a discussion of supplementary Unicode characters.

See Also

IsAlphabetic(UInt32) IsAlphabetic(UInt32) IsAlphabetic(UInt32) IsAlphabetic(UInt32)

Determines if a specified Unicode character can be considered alphabetic.

public : static PlatForm::Boolean IsAlphabetic(unsigned int codepoint)public static bool IsAlphabetic(UInt32 codepoint)Public Static Function IsAlphabetic(codepoint As UInt32) As bool// You can use this method in JavaScript.
Parameters
codepoint
unsigned int UInt32 UInt32 UInt32

A Unicode character. This must be in the proper range: 0 <= codepoint <= 0x10FFFF.

Returns
PlatForm::Boolean bool bool bool

TRUE if codepoint is alphabetic; otherwise FALSE.

See Also

IsCased(UInt32) IsCased(UInt32) IsCased(UInt32) IsCased(UInt32)

Determines if a specified Unicode character can be considered cased (uppercase, lowercase or titlecase).

public : static PlatForm::Boolean IsCased(unsigned int codepoint)public static bool IsCased(UInt32 codepoint)Public Static Function IsCased(codepoint As UInt32) As bool// You can use this method in JavaScript.
Parameters
codepoint
unsigned int UInt32 UInt32 UInt32

A Unicode character. This must be in the proper range: 0 <= codepoint <= 0x10FFFF.

Returns
PlatForm::Boolean bool bool bool

TRUE if codepoint is cased; otherwise FALSE.

See Also

IsGraphemeBase(UInt32) IsGraphemeBase(UInt32) IsGraphemeBase(UInt32) IsGraphemeBase(UInt32)

Determines if a specified Unicode character can be considered the beginning of a grapheme.

public : static PlatForm::Boolean IsGraphemeBase(unsigned int codepoint)public static bool IsGraphemeBase(UInt32 codepoint)Public Static Function IsGraphemeBase(codepoint As UInt32) As bool// You can use this method in JavaScript.
Parameters
codepoint
unsigned int UInt32 UInt32 UInt32

A Unicode character. This must be in the proper range: 0 <= codepoint <= 0x10FFFF.

Returns
PlatForm::Boolean bool bool bool

TRUE if codepoint is the beginning of a grapheme; otherwise FALSE.

See Also

IsGraphemeExtend(UInt32) IsGraphemeExtend(UInt32) IsGraphemeExtend(UInt32) IsGraphemeExtend(UInt32)

Determines if a specified Unicode character can be considered to continue a previous grapheme.

public : static PlatForm::Boolean IsGraphemeExtend(unsigned int codepoint)public static bool IsGraphemeExtend(UInt32 codepoint)Public Static Function IsGraphemeExtend(codepoint As UInt32) As bool// You can use this method in JavaScript.
Parameters
codepoint
unsigned int UInt32 UInt32 UInt32

A Unicode character. This must be in the proper range: 0 <= codepoint <= 0x10FFFF.

Returns
PlatForm::Boolean bool bool bool

TRUE if codepoint continues the previous grapheme; otherwise FALSE.

See Also

IsHighSurrogate(UInt32) IsHighSurrogate(UInt32) IsHighSurrogate(UInt32) IsHighSurrogate(UInt32)

Determines if a specified Unicode character is a high surrogate.

public : static PlatForm::Boolean IsHighSurrogate(unsigned int codepoint)public static bool IsHighSurrogate(UInt32 codepoint)Public Static Function IsHighSurrogate(codepoint As UInt32) As bool// You can use this method in JavaScript.
Parameters
codepoint
unsigned int UInt32 UInt32 UInt32

A Unicode character. This must be in the proper range: 0 <= codepoint <= 0x10FFFF.

Returns
PlatForm::Boolean bool bool bool

TRUE if codepoint is a high surrogate; otherwise FALSE.

See Also

IsIdContinue(UInt32) IsIdContinue(UInt32) IsIdContinue(UInt32) IsIdContinue(UInt32)

Determines if a specified Unicode character can be considered a continuation character of an identifier in programming.

public : static PlatForm::Boolean IsIdContinue(unsigned int codepoint)public static bool IsIdContinue(UInt32 codepoint)Public Static Function IsIdContinue(codepoint As UInt32) As bool// You can use this method in JavaScript.
Parameters
codepoint
unsigned int UInt32 UInt32 UInt32

A Unicode character. This must be in the proper range: 0 <= codepoint <= 0x10FFFF.

Returns
PlatForm::Boolean bool bool bool

TRUE if codepoint is a continuation character of an identifier in programming; otherwise FALSE.

See Also

IsIdStart(UInt32) IsIdStart(UInt32) IsIdStart(UInt32) IsIdStart(UInt32)

Determines if a specified Unicode character can be considered the start character of an identifier in programming.

public : static PlatForm::Boolean IsIdStart(unsigned int codepoint)public static bool IsIdStart(UInt32 codepoint)Public Static Function IsIdStart(codepoint As UInt32) As bool// You can use this method in JavaScript.
Parameters
codepoint
unsigned int UInt32 UInt32 UInt32

A Unicode character. This must be in the proper range: 0 <= codepoint <= 0x10FFFF.

Returns
PlatForm::Boolean bool bool bool

TRUE if codepoint is the start character of an identifier in programming; otherwise FALSE.

See Also

IsLowercase(UInt32) IsLowercase(UInt32) IsLowercase(UInt32) IsLowercase(UInt32)

Determines if a specified Unicode character can be considered a lower case character.

public : static PlatForm::Boolean IsLowercase(unsigned int codepoint)public static bool IsLowercase(UInt32 codepoint)Public Static Function IsLowercase(codepoint As UInt32) As bool// You can use this method in JavaScript.
Parameters
codepoint
unsigned int UInt32 UInt32 UInt32

A Unicode character. This must be in the proper range: 0 <= codepoint <= 0x10FFFF.

Returns
PlatForm::Boolean bool bool bool

TRUE if codepoint is a lower case character; otherwise FALSE.

See Also

IsLowSurrogate(UInt32) IsLowSurrogate(UInt32) IsLowSurrogate(UInt32) IsLowSurrogate(UInt32)

Determines if a specified Unicode character is a low surrogate.

public : static PlatForm::Boolean IsLowSurrogate(unsigned int codepoint)public static bool IsLowSurrogate(UInt32 codepoint)Public Static Function IsLowSurrogate(codepoint As UInt32) As bool// You can use this method in JavaScript.
Parameters
codepoint
unsigned int UInt32 UInt32 UInt32

A Unicode character. This must be in the proper range: 0 <= codepoint <= 0x10FFFF.

Returns
PlatForm::Boolean bool bool bool

TRUE if codepoint is a low surrogate; otherwise FALSE.

See Also

IsNoncharacter(UInt32) IsNoncharacter(UInt32) IsNoncharacter(UInt32) IsNoncharacter(UInt32)

Determines if a specified codepoint is a non-character.

public : static PlatForm::Boolean IsNoncharacter(unsigned int codepoint)public static bool IsNoncharacter(UInt32 codepoint)Public Static Function IsNoncharacter(codepoint As UInt32) As bool// You can use this method in JavaScript.
Parameters
codepoint
unsigned int UInt32 UInt32 UInt32

A Unicode character. This must be in the proper range: 0 <= codepoint <= 0x10FFFF.

Returns
PlatForm::Boolean bool bool bool

TRUE if codepoint is a non-character; otherwise FALSE.

Remarks

This method determines if codepoint is a one of the invalid Unicode code points (U+FFD0 through U+FFEF, U+xxFFFE, or U+xxFFFF).

See Also

IsSupplementary(UInt32) IsSupplementary(UInt32) IsSupplementary(UInt32) IsSupplementary(UInt32)

Determines if a specified Unicode character is a supplementary character.

public : static PlatForm::Boolean IsSupplementary(unsigned int codepoint)public static bool IsSupplementary(UInt32 codepoint)Public Static Function IsSupplementary(codepoint As UInt32) As bool// You can use this method in JavaScript.
Parameters
codepoint
unsigned int UInt32 UInt32 UInt32

A Unicode character. This must be in the proper range: 0 <= codepoint <= 0x10FFFF.

Returns
PlatForm::Boolean bool bool bool

TRUE if codepoint is a supplementary character; otherwise FALSE.

Remarks

This method determines if codepoint is a supplementary character (greater than 0xFFFF).

See Also

IsUppercase(UInt32) IsUppercase(UInt32) IsUppercase(UInt32) IsUppercase(UInt32)

Determines if a specified Unicode character can be considered an upper case character.

public : static PlatForm::Boolean IsUppercase(unsigned int codepoint)public static bool IsUppercase(UInt32 codepoint)Public Static Function IsUppercase(codepoint As UInt32) As bool// You can use this method in JavaScript.
Parameters
codepoint
unsigned int UInt32 UInt32 UInt32

A Unicode character. This must be in the proper range: 0 <= codepoint <= 0x10FFFF.

Returns
PlatForm::Boolean bool bool bool

TRUE if codepoint is an upper case character; otherwise FALSE.

See Also

IsWhitespace(UInt32) IsWhitespace(UInt32) IsWhitespace(UInt32) IsWhitespace(UInt32)

Determines if a specified Unicode character can be considered whitespace.

public : static PlatForm::Boolean IsWhitespace(unsigned int codepoint)public static bool IsWhitespace(UInt32 codepoint)Public Static Function IsWhitespace(codepoint As UInt32) As bool// You can use this method in JavaScript.
Parameters
codepoint
unsigned int UInt32 UInt32 UInt32

A Unicode character. This must be in the proper range: 0 <= codepoint <= 0x10FFFF.

Returns
PlatForm::Boolean bool bool bool

TRUE if codepoint is whitespace; otherwise FALSE.

See Also

See Also