Share via


UnicodeCharacters Class

Definition

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

public ref class UnicodeCharacters abstract sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class UnicodeCharacters final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public static class UnicodeCharacters
Public Class UnicodeCharacters
Inheritance
Object Platform::Object IInspectable UnicodeCharacters
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

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)

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

GetGeneralCategory(UInt32)

Returns the UnicodeGeneralCategory of the specified Unicode character.

GetNumericType(UInt32)

Returns the UnicodeNumericType of the specified Unicode character.

GetSurrogatePairFromCodepoint(UInt32, Char, Char)

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

IsAlphabetic(UInt32)

Determines if a specified Unicode character can be considered alphabetic.

IsCased(UInt32)

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

IsGraphemeBase(UInt32)

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

IsGraphemeExtend(UInt32)

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

IsHighSurrogate(UInt32)

Determines if a specified Unicode character is a high surrogate.

IsIdContinue(UInt32)

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

IsIdStart(UInt32)

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

IsLowercase(UInt32)

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

IsLowSurrogate(UInt32)

Determines if a specified Unicode character is a low surrogate.

IsNoncharacter(UInt32)

Determines if a specified codepoint is a non-character.

IsSupplementary(UInt32)

Determines if a specified Unicode character is a supplementary character.

IsUppercase(UInt32)

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

IsWhitespace(UInt32)

Determines if a specified Unicode character can be considered whitespace.

Applies to

See also