Sign in Join
FPDoc Onlineexperiment

TCharacter.GetNumericValue function

Member of TCharacterpublicIn unit Character

Get the numeric value of the character.

Declaration

pascal
class function GetNumericValue(AChar: UnicodeChar): Double; overload
 ; static
class function GetNumericValue(const AString: UnicodeString; 
 AIndex: Integer): Double; overload
 ; static
class function GetNumericValue(aChar: UCS4Char): Double; overload
 ; static

Arguments

AChar

UTF16 Character.

AString

String containing UTF-16 encoded characters.

AIndex

Index of UTF16 encoded character in AString to be checked.

Function result

Numerical ID of the Unicode character.

Description

TCharacter.GetNumericValue returns the numerical value (ID) of the Unicode character. The character can be presented in 2 ways: AChar, a UTF16 Unicode character, or a surrogate pair in a Unicode string AString starting at position AIndex.

Errors

If AIndex is not a valid character index in the string AString, an EArgumentOutOfRangeException exception is raised. If the character at that position is not complete, an EArgumentException exception is raised.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.