DotNetDupe 4.0.6
C++17/20 Implementation of the .NET Base Class Library (BCL)
Loading...
Searching...
No Matches
DotNetDupe::System::Char Class Reference

Represents a Unicode character (as a UTF-32 char32_t code point). More...

#include <Char.h>

Inheritance diagram for DotNetDupe::System::Char:

Public Member Functions

 Char ()
 Initializes a new instance of the Char class with null character.
 Char (char32_t c)
 Initializes a new instance of the Char class with the specified Unicode code point.
bool Equals (char32_t c) const
char32_t GetChar () const
void operator= (char32_t c)
bool operator== (char32_t c) const
String ToString () const
Public Member Functions inherited from DotNetDupe::System::Object
virtual ~Object ()=default
 Virtual destructor ensuring polymorphic cleanup.
virtual bool Equals (const Object &obj) const
 Determines whether the specified Object is equal to the current Object.
virtual int GetHashCode () const
 Serves as the default hash function.
bool operator== (const Object &obj) const
 Determines reference equality between two objects.
char * ToStringA () const
 Returns narrow-character string representation.
wchar_t * ToStringW () const
 Returns wide-character string representation.

Static Public Member Functions

static double GetNumericValue (char32_t c)
 Converts the specified numeric Unicode character to a double-precision floating point number.
static bool IsAscii (char32_t c)
 Indicates whether the specified character is categorized as an ASCII character (0x00 - 0x7F).
static bool IsAsciiDigit (char32_t c)
static bool IsAsciiHexDigit (char32_t c)
static bool IsAsciiHexDigitLower (char32_t c)
static bool IsAsciiHexDigitUpper (char32_t c)
static bool IsAsciiLetter (char32_t c)
static bool IsAsciiLetterLower (char32_t c)
static bool IsAsciiLetterOrDigit (char32_t c)
static bool IsAsciiLetterUpper (char32_t c)
static bool IsBetween (char32_t c, char32_t minInclusive, char32_t maxInclusive)
static bool IsControl (char32_t c)
static bool IsDigit (char32_t c)
static bool IsLetter (char32_t c)
static bool IsLetterOrDigit (char32_t c)
static bool IsLower (char32_t c)
static bool IsNumber (char32_t c)
static bool IsPunctuation (char32_t c)
static bool IsSeparator (char32_t c)
static bool IsSurrogate (char32_t c)
static bool IsSymbol (char32_t c)
static bool IsUpper (char32_t c)
static bool IsWhiteSpace (char32_t c)
static char32_t ToLower (char32_t c)
static String ToString (char32_t c)
static char32_t ToUpper (char32_t c)
Static Public Member Functions inherited from DotNetDupe::System::Object
static bool Equals (const Object &obj1, const Object &obj2)
 Static helper determining whether two object instances are equal.

Detailed Description

Represents a Unicode character (as a UTF-32 char32_t code point).

Provides static methods for classifying Unicode characters, converting between upper/lower cases, validating ASCII and Latin-1 ranges, and querying numeric values. Immutable value type; thread-safe for all operations.

Note
Conforms to ECMA-335 Partition IV Section 5.13 (System.Char) and Unicode 15.0.
See also
String, BitConverter

Definition at line 20 of file Char.h.

Constructor & Destructor Documentation

◆ Char() [1/2]

DotNetDupe::System::Char::Char ( )

Initializes a new instance of the Char class with null character.

Definition at line 8 of file Char.cpp.

◆ Char() [2/2]

DotNetDupe::System::Char::Char ( char32_t c)

Initializes a new instance of the Char class with the specified Unicode code point.

Parameters
c32-bit Unicode code point.

Definition at line 10 of file Char.cpp.

Member Function Documentation

◆ Equals()

bool DotNetDupe::System::Char::Equals ( char32_t c) const

Definition at line 18 of file Char.cpp.

◆ GetChar()

char32_t DotNetDupe::System::Char::GetChar ( ) const
inline

Definition at line 74 of file Char.h.

References DOTNETDUPE_API.

Referenced by DotNetDupe::System::Console::Write(), and DotNetDupe::System::Console::WriteLine().

◆ GetNumericValue()

double DotNetDupe::System::Char::GetNumericValue ( char32_t c)
static

Converts the specified numeric Unicode character to a double-precision floating point number.

Parameters
cUnicode code point to evaluate.
Returns
Numeric value of character if numeric; otherwise -1.0.

Definition at line 26 of file Char.cpp.

◆ IsAscii()

bool DotNetDupe::System::Char::IsAscii ( char32_t c)
static

Indicates whether the specified character is categorized as an ASCII character (0x00 - 0x7F).

Definition at line 33 of file Char.cpp.

◆ IsAsciiDigit()

bool DotNetDupe::System::Char::IsAsciiDigit ( char32_t c)
static

Definition at line 37 of file Char.cpp.

◆ IsAsciiHexDigit()

bool DotNetDupe::System::Char::IsAsciiHexDigit ( char32_t c)
static

Definition at line 41 of file Char.cpp.

◆ IsAsciiHexDigitLower()

bool DotNetDupe::System::Char::IsAsciiHexDigitLower ( char32_t c)
static

Definition at line 47 of file Char.cpp.

◆ IsAsciiHexDigitUpper()

bool DotNetDupe::System::Char::IsAsciiHexDigitUpper ( char32_t c)
static

Definition at line 52 of file Char.cpp.

◆ IsAsciiLetter()

bool DotNetDupe::System::Char::IsAsciiLetter ( char32_t c)
static

Definition at line 57 of file Char.cpp.

◆ IsAsciiLetterLower()

bool DotNetDupe::System::Char::IsAsciiLetterLower ( char32_t c)
static

Definition at line 61 of file Char.cpp.

◆ IsAsciiLetterOrDigit()

bool DotNetDupe::System::Char::IsAsciiLetterOrDigit ( char32_t c)
static

Definition at line 65 of file Char.cpp.

◆ IsAsciiLetterUpper()

bool DotNetDupe::System::Char::IsAsciiLetterUpper ( char32_t c)
static

Definition at line 71 of file Char.cpp.

◆ IsBetween()

bool DotNetDupe::System::Char::IsBetween ( char32_t c,
char32_t minInclusive,
char32_t maxInclusive )
static

Definition at line 75 of file Char.cpp.

◆ IsControl()

bool DotNetDupe::System::Char::IsControl ( char32_t c)
static

Check C0 control codes (0x00-0x1F), Delete (0x7F), and C1 control codes (0x80-0x9F).

Inspect BMP locale classification and supplementary control plane (0xE0000-0xE007F).

Definition at line 79 of file Char.cpp.

◆ IsDigit()

bool DotNetDupe::System::Char::IsDigit ( char32_t c)
static

Check BMP digits via std::iswdigit and Mathematical alphanumeric supplementary range.

Definition at line 89 of file Char.cpp.

Referenced by IsLetterOrDigit(), and IsNumber().

◆ IsLetter()

bool DotNetDupe::System::Char::IsLetter ( char32_t c)
static

Fast check for ASCII letters and Latin-1 supplement letters.

Evaluate BMP alpha status and CJK Unified Ideographs Extension B.

Definition at line 101 of file Char.cpp.

Referenced by IsLetterOrDigit().

◆ IsLetterOrDigit()

bool DotNetDupe::System::Char::IsLetterOrDigit ( char32_t c)
static

Combine letter and digit evaluations across Unicode planes.

Definition at line 114 of file Char.cpp.

References IsDigit(), and IsLetter().

◆ IsLower()

bool DotNetDupe::System::Char::IsLower ( char32_t c)
static

Check BMP lowercase letters and Deseret supplementary plane lowercase range.

Definition at line 95 of file Char.cpp.

◆ IsNumber()

bool DotNetDupe::System::Char::IsNumber ( char32_t c)
static

Definition at line 135 of file Char.cpp.

References IsDigit().

◆ IsPunctuation()

bool DotNetDupe::System::Char::IsPunctuation ( char32_t c)
static

References DOTNETDUPE_API.

◆ IsSeparator()

bool DotNetDupe::System::Char::IsSeparator ( char32_t c)
static

References DOTNETDUPE_API.

◆ IsSurrogate()

bool DotNetDupe::System::Char::IsSurrogate ( char32_t c)
static

References DOTNETDUPE_API.

◆ IsSymbol()

bool DotNetDupe::System::Char::IsSymbol ( char32_t c)
static

References DOTNETDUPE_API.

◆ IsUpper()

bool DotNetDupe::System::Char::IsUpper ( char32_t c)
static

References DOTNETDUPE_API.

◆ IsWhiteSpace()

bool DotNetDupe::System::Char::IsWhiteSpace ( char32_t c)
static

References DOTNETDUPE_API, and ToLower().

◆ operator=()

void DotNetDupe::System::Char::operator= ( char32_t c)

Definition at line 14 of file Char.cpp.

◆ operator==()

bool DotNetDupe::System::Char::operator== ( char32_t c) const

Definition at line 22 of file Char.cpp.

◆ ToLower()

char32_t DotNetDupe::System::Char::ToLower ( char32_t c)
static

Fold ASCII and Latin-1 uppercase letters to lowercase via +0x20 offset.

Fold BMP wide-character locale code points.

Definition at line 120 of file Char.cpp.

Referenced by IsWhiteSpace().

◆ ToString() [1/2]

String DotNetDupe::System::Char::ToString ( ) const

References DOTNETDUPE_API.

◆ ToString() [2/2]

String DotNetDupe::System::Char::ToString ( char32_t c)
static

References DOTNETDUPE_API.

◆ ToUpper()

char32_t DotNetDupe::System::Char::ToUpper ( char32_t c)
static

References DOTNETDUPE_API.


The documentation for this class was generated from the following files: