Show: Delphi C++
Display Preferences

System.Character.TCharacter

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

  TCharacter = record
  public
    const
      MaxHighSurrogate       = #$DBFF;
      MaxLowSurrogate        = #$DFFF;
      MaxSurrogate           = #$DFFF;
      MinHighSurrogate       = #$D800;
      MinLowSurrogate        = #$DC00;
      MinSurrogate           = #$D800;
    class function MaxCodePoint: Integer; static;
    class function UnicodeDataVersion: string; static;
    class function ConvertFromUtf32(C: UCS4Char): string; static;
    class function ConvertToUtf32(const S: string; Index: Integer): UCS4Char; overload; inline; static;
    class function ConvertToUtf32(const S: string; Index: Integer; out CharLength: Integer): UCS4Char; overload; inline; static;
    class function ConvertToUtf32(const HighSurrogate, LowSurrogate: Char): UCS4Char; overload; inline; static;
    class function GetNumericValue(C: Char): Double; overload; inline; static;
    class function GetNumericValue(C: UCS4Char): Double; overload; inline; static;
    class function GetNumericValue(const S: string; Index: Integer): Double; overload; inline; static;
    class function GetUnicodeCategory(C: Char): TUnicodeCategory; overload; inline; static;
    class function GetUnicodeCategory(C: UCS4Char): TUnicodeCategory; overload; inline; static;
    class function GetUnicodeCategory(const S: string; Index: Integer): TUnicodeCategory; overload; inline; static;
    class function IsControl(C: Char): Boolean; overload; inline; static;
    class function IsControl(C: UCS4Char): Boolean; overload; inline; static;
    class function IsControl(const S: string; Index: Integer): Boolean; overload; inline; static;
    class function IsDefined(C: Char): Boolean; overload; inline; static;
    class function IsDefined(C: UCS4Char): Boolean; overload; inline; static;
    class function IsDefined(const S: string; Index: Integer): Boolean; overload; inline; static;
    class function IsDigit(C: Char): Boolean; overload; inline; static;
    class function IsDigit(C: UCS4Char): Boolean; overload; inline; static;
    class function IsDigit(const S: string; Index: Integer): Boolean; overload; inline; static;
    class function IsHighSurrogate(C: Char): Boolean; overload; inline; static;
    class function IsHighSurrogate(C: UCS4Char): Boolean; overload; inline; static;
    class function IsHighSurrogate(const S: string; Index: Integer): Boolean; overload; inline; static;
    class function IsLetter(C: Char): Boolean; overload; inline; static;
    class function IsLetter(C: UCS4Char): Boolean; overload; inline; static;
    class function IsLetter(const S: string; Index: Integer): Boolean; overload; inline; static;
    class function IsLetterOrDigit(C: Char): Boolean; overload; inline; static;
    class function IsLetterOrDigit(C: UCS4Char): Boolean; overload; inline; static;
    class function IsLetterOrDigit(const S: string; Index: Integer): Boolean; overload; inline; static;
    class function IsLower(C: Char): Boolean; overload; inline; static;
    class function IsLower(C: UCS4Char): Boolean; overload; inline; static;
    class function IsLower(const S: string; Index: Integer): Boolean; overload; inline; static;
    class function IsLowSurrogate(C: Char): Boolean; overload; inline; static;
    class function IsLowSurrogate(C: UCS4Char): Boolean; overload; inline; static;
    class function IsLowSurrogate(const S: string; Index: Integer): Boolean; overload; inline; static;
    class function IsNumber(C: Char): Boolean; overload; inline; static;
    class function IsNumber(C: UCS4Char): Boolean; overload; inline; static;
    class function IsNumber(const S: string; Index: Integer): Boolean; overload; inline; static;
    class function IsPunctuation(C: Char): Boolean; overload; inline; static;
    class function IsPunctuation(C: UCS4Char): Boolean; overload; inline; static;
    class function IsPunctuation(const S: string; Index: Integer): Boolean; overload; inline; static;
    class function IsSeparator(C: Char): Boolean; overload; inline; static;
    class function IsSeparator(C: UCS4Char): Boolean; overload; inline; static;
    class function IsSeparator(const S: string; Index: Integer): Boolean; overload; inline; static;
    class function IsSurrogate(Surrogate: Char): Boolean; overload; inline; static;
    class function IsSurrogate(Surrogate: UCS4Char): Boolean; overload; inline; static;
    class function IsSurrogate(const S: string; Index: Integer): Boolean; overload; inline; static;
    class function IsSurrogatePair(const HighSurrogate, LowSurrogate: Char): Boolean; overload; inline; static;
    class function IsSurrogatePair(const S: string; Index: Integer): Boolean; overload; inline; static;
    class function IsSymbol(C: Char): Boolean; overload; inline; static;
    class function IsSymbol(C: UCS4Char): Boolean; overload; inline; static;
    class function IsSymbol(const S: string; Index: Integer): Boolean; overload; inline; static;
    class function IsUpper(C: Char): Boolean; overload; inline; static;
    class function IsUpper(C: UCS4Char): Boolean; overload; inline; static;
    class function IsUpper(const S: string; Index: Integer): Boolean; overload; inline; static;
    class function IsWhiteSpace(C: Char): Boolean; overload; inline; static;
    class function IsWhiteSpace(C: UCS4Char): Boolean; overload; inline; static;
    class function IsWhiteSpace(const S: string; Index: Integer): Boolean; overload; inline; static;
    class function ToLower(C: Char): Char; overload; inline; static;
    class function ToLower(C: UCS4Char): UCS4Char; overload; inline; static;
    class function ToLower(const S: string): string; overload; inline; static;
    class function ToUpper(C: Char): Char; overload; inline; static;
    class function ToUpper(C: UCS4Char): UCS4Char; overload; inline; static;
    class function ToUpper(const S: string): string; overload; inline; static;
  end deprecated 'Use TCharHelper';

C++

struct DECLSPEC_DRECORD TCharacter
{
public:
    static const System::WideChar MaxHighSurrogate = (System::WideChar)(0xdbff);
    static const System::WideChar MaxLowSurrogate = (System::WideChar)(0xdfff);
    static const System::WideChar MaxSurrogate = (System::WideChar)(0xdfff);
    static const System::WideChar MinHighSurrogate = (System::WideChar)(0xd800);
    static const System::WideChar MinLowSurrogate = (System::WideChar)(0xdc00);
    static const System::WideChar MinSurrogate = (System::WideChar)(0xd800);
    static int __fastcall MaxCodePoint();
    static System::UnicodeString __fastcall UnicodeDataVersion();
    static System::UnicodeString __fastcall ConvertFromUtf32(System::UCS4Char C);
    static System::UCS4Char __fastcall ConvertToUtf32(const System::UnicodeString S, int Index)/* overload */;
    static System::UCS4Char __fastcall ConvertToUtf32(const System::UnicodeString S, int Index, /* out */ int &CharLength)/* overload */;
    static System::UCS4Char __fastcall ConvertToUtf32(const System::WideChar HighSurrogate, const System::WideChar LowSurrogate)/* overload */;
    static double __fastcall GetNumericValue(System::WideChar C)/* overload */;
    static double __fastcall GetNumericValue(System::UCS4Char C)/* overload */;
    static double __fastcall GetNumericValue(const System::UnicodeString S, int Index)/* overload */;
    static TUnicodeCategory __fastcall GetUnicodeCategory(System::WideChar C)/* overload */;
    static TUnicodeCategory __fastcall GetUnicodeCategory(System::UCS4Char C)/* overload */;
    static TUnicodeCategory __fastcall GetUnicodeCategory(const System::UnicodeString S, int Index)/* overload */;
    static bool __fastcall IsControl(System::WideChar C)/* overload */;
    static bool __fastcall IsControl(System::UCS4Char C)/* overload */;
    static bool __fastcall IsControl(const System::UnicodeString S, int Index)/* overload */;
    static bool __fastcall IsDefined(System::WideChar C)/* overload */;
    static bool __fastcall IsDefined(System::UCS4Char C)/* overload */;
    static bool __fastcall IsDefined(const System::UnicodeString S, int Index)/* overload */;
    static bool __fastcall IsDigit(System::WideChar C)/* overload */;
    static bool __fastcall IsDigit(System::UCS4Char C)/* overload */;
    static bool __fastcall IsDigit(const System::UnicodeString S, int Index)/* overload */;
    static bool __fastcall IsHighSurrogate(System::WideChar C)/* overload */;
    static bool __fastcall IsHighSurrogate(System::UCS4Char C)/* overload */;
    static bool __fastcall IsHighSurrogate(const System::UnicodeString S, int Index)/* overload */;
    static bool __fastcall IsLetter(System::WideChar C)/* overload */;
    static bool __fastcall IsLetter(System::UCS4Char C)/* overload */;
    static bool __fastcall IsLetter(const System::UnicodeString S, int Index)/* overload */;
    static bool __fastcall IsLetterOrDigit(System::WideChar C)/* overload */;
    static bool __fastcall IsLetterOrDigit(System::UCS4Char C)/* overload */;
    static bool __fastcall IsLetterOrDigit(const System::UnicodeString S, int Index)/* overload */;
    static bool __fastcall IsLower(System::WideChar C)/* overload */;
    static bool __fastcall IsLower(System::UCS4Char C)/* overload */;
    static bool __fastcall IsLower(const System::UnicodeString S, int Index)/* overload */;
    static bool __fastcall IsLowSurrogate(System::WideChar C)/* overload */;
    static bool __fastcall IsLowSurrogate(System::UCS4Char C)/* overload */;
    static bool __fastcall IsLowSurrogate(const System::UnicodeString S, int Index)/* overload */;
    static bool __fastcall IsNumber(System::WideChar C)/* overload */;
    static bool __fastcall IsNumber(System::UCS4Char C)/* overload */;
    static bool __fastcall IsNumber(const System::UnicodeString S, int Index)/* overload */;
    static bool __fastcall IsPunctuation(System::WideChar C)/* overload */;
    static bool __fastcall IsPunctuation(System::UCS4Char C)/* overload */;
    static bool __fastcall IsPunctuation(const System::UnicodeString S, int Index)/* overload */;
    static bool __fastcall IsSeparator(System::WideChar C)/* overload */;
    static bool __fastcall IsSeparator(System::UCS4Char C)/* overload */;
    static bool __fastcall IsSeparator(const System::UnicodeString S, int Index)/* overload */;
    static bool __fastcall IsSurrogate(System::WideChar Surrogate)/* overload */;
    static bool __fastcall IsSurrogate(System::UCS4Char Surrogate)/* overload */;
    static bool __fastcall IsSurrogate(const System::UnicodeString S, int Index)/* overload */;
    static bool __fastcall IsSurrogatePair(const System::WideChar HighSurrogate, const System::WideChar LowSurrogate)/* overload */;
    static bool __fastcall IsSurrogatePair(const System::UnicodeString S, int Index)/* overload */;
    static bool __fastcall IsSymbol(System::WideChar C)/* overload */;
    static bool __fastcall IsSymbol(System::UCS4Char C)/* overload */;
    static bool __fastcall IsSymbol(const System::UnicodeString S, int Index)/* overload */;
    static bool __fastcall IsUpper(System::WideChar C)/* overload */;
    static bool __fastcall IsUpper(System::UCS4Char C)/* overload */;
    static bool __fastcall IsUpper(const System::UnicodeString S, int Index)/* overload */;
    static bool __fastcall IsWhiteSpace(System::WideChar C)/* overload */;
    static bool __fastcall IsWhiteSpace(System::UCS4Char C)/* overload */;
    static bool __fastcall IsWhiteSpace(const System::UnicodeString S, int Index)/* overload */;
    static System::WideChar __fastcall ToLower(System::WideChar C)/* overload */;
    static System::UCS4Char __fastcall ToLower(System::UCS4Char C)/* overload */;
    static System::UnicodeString __fastcall ToLower(const System::UnicodeString S)/* overload */;
    static System::WideChar __fastcall ToUpper(System::WideChar C)/* overload */;
    static System::UCS4Char __fastcall ToUpper(System::UCS4Char C)/* overload */;
    static System::UnicodeString __fastcall ToUpper(const System::UnicodeString S)/* overload */;
};

Properties

Type Visibility Source Unit Parent
record
struct
public
System.Character.pas
System.Character.hpp
System.Character System.Character

Description

Warning: TCharacter is deprecated. Please use TCharHelper.

TCharacter provides class functions for the conversion and identification of Unicode characters.

Use TCharacter functions to:

  • Convert Unicode characters from UTF-32 to UTF-16 and back.
  • Identify the type of a character: letter, digit, punctuation, and so on.

TCharacter uses the latest definitions of Unicode character type data as defined by unicode.org. You should not instantiate TCharacter; it contains only class functions.

See Also

Personal tools
In Other Languages
Previous Versions
Assistance