|
libcommonc++
0.7
|
A class representing a UTF-16 character. More...
#include <Char.h++>

Public Member Functions | |
| Char () | |
| Construct a new, NUL character. More... | |
| Char (char c) | |
| Construct a new character with the given ASCII value. More... | |
| Char (char16_t c) | |
| Construct a new character with the given UTF-16 value. More... | |
| Char (int c) | |
| Construct a new character with the given unicode value. More... | |
| ~Char () | |
| Destructor. More... | |
| Char & | operator= (char c) |
| Assignment operator. More... | |
| Char & | operator= (char16_t c) |
| Assignment operator. More... | |
| Char & | operator= (int c) |
| Assignment operator. More... | |
| bool | isNul () const |
| Tests if the character is NUL. More... | |
| bool | isControl () const |
| Tests if the character is a control character. More... | |
| bool | isPrintable () const |
| Tests if the character is printable. More... | |
| bool | isGraphical () const |
| Tests if the character is graphical. More... | |
| bool | isPunctuation () const |
| Tests if the character is punctuation. More... | |
| bool | isLetter () const |
| Tests if the character is a letter. More... | |
| bool | isDigit () const |
| Tests if the character is a digit. More... | |
| bool | isHexDigit () const |
| Tests if the character is a hexadecimal digit. More... | |
| bool | isAlphabetic () const |
| Tests if the character is alphabetic. More... | |
| bool | isAlphaNumeric () const |
| Tests if the character is alphanumeric. More... | |
| bool | isSign () const |
| Tests if the character is a sign symbol (+ or -). More... | |
| bool | isWhitespace () const |
| Tests if the character is whitespace. More... | |
| bool | isLowerCase () const |
| Tests if the character is a lowercase letter. More... | |
| bool | isUpperCase () const |
| Tests if the character is an uppercase letter. More... | |
| Char | toLowerCase () const |
| Returns the lowercase form of the character. More... | |
| Char | toUpperCase () const |
| Returns the uppercase form of the character. More... | |
| bool | isASCII () const |
| Tests if the character is ASCII. More... | |
| bool | isLowASCII () const |
| Tests if the character is low ASCII. More... | |
| bool | isHighASCII () const |
| Tests if the character is high ASCII. More... | |
| bool | isLowSurrogate () const |
| Tests if the character is a low surrogate. More... | |
| bool | isHighSurrogate () const |
| Tests if the character is a high surrogate. More... | |
| char16_t | toChar16 () const |
| Returns the char16_t for this character. More... | |
| char | toASCII () const |
| Returns the ASCII character equivalent for this character, or 0 if this character is not ASCII. More... | |
| bool | operator== (const Char &other) const |
| Equality operator. More... | |
| bool | operator== (char16_t other) const |
| Equality operator. More... | |
| bool | operator!= (const Char &other) const |
| Inequality operator. More... | |
| bool | operator< (const Char &other) const |
| bool | operator> (const Char &other) const |
| bool | operator<= (const Char &other) const |
| bool | operator>= (const Char &other) const |
| bool | operator! () const |
| Equivalent to isNul(). More... | |
| Char & | operator++ () |
| Increment operator (prefix). More... | |
| Char | operator++ (int) |
| Increment operator (postfix). More... | |
| Char & | operator-- () |
| Decrement operator (prefix). More... | |
| Char | operator-- (int) |
| Decrement operator (postfix). More... | |
Static Public Member Functions | |
| static bool | isNul (char16_t c) |
| Tests if a character is NUL. More... | |
| static bool | isControl (char16_t c) |
| Tests if a character is a control character. More... | |
| static bool | isPrintable (char16_t c) |
| Tests if a character is a printable character. More... | |
| static bool | isGraphical (char16_t c) |
| Tests if a character is a graphical character. More... | |
| static bool | isPunctuation (char16_t c) |
| Tests if a character is a punctuation character. More... | |
| static bool | isLetter (char16_t c) |
| Tests if the character is a letter. More... | |
| static bool | isDigit (char16_t c) |
| Tests if a character is a digit. More... | |
| static bool | isHexDigit (char16_t c) |
| Tests if a character is a hexadeciaml digit. More... | |
| static bool | isAlphabetic (char16_t c) |
| Tests if a character is alphabetic. More... | |
| static bool | isAlphaNumeric (char16_t c) |
| Tests if a character is alphanumeric. More... | |
| static bool | isSign (char16_t c) |
| Tests if a character is a sign symbol (+ or -). More... | |
| static bool | isWhitespace (char16_t c) |
| Tests if a character is whitespace. More... | |
| static bool | isLowerCase (char16_t c) |
| Tests if a character is a lowercase letter. More... | |
| static bool | isUpperCase (char16_t c) |
| Tests if a character is an uppercase letter. More... | |
| static char16_t | toLowerCase (char16_t c) |
| Returns the lowercase form of a character. More... | |
| static char16_t | toUpperCase (char16_t c) |
| Returns the uppercase form of a character. More... | |
| static bool | isASCII (char16_t c) |
| Tests if a character is high ASCII. More... | |
| static bool | isLowASCII (char16_t c) |
| Tests if a character is low ASCII. More... | |
| static bool | isHighASCII (char16_t c) |
| Tests if a character is high ASCII. More... | |
| static bool | isLowSurrogate (char16_t c) |
| Tests if a character is a low surrogate. More... | |
| static bool | isHighSurrogate (char16_t c) |
| Tests if a character is a high surrogate. More... | |
| static char | toASCII (char16_t c) |
| Returns the character in ASCII, or NUL if the character is not in the range of ASCII characters. More... | |
Static Public Attributes | |
| static const Char | nul |
| The NUL character. More... | |
| static const Char | BELL = Char('\a') |
| The bell character. More... | |
| static const Char | BACKSPACE = Char('\b') |
| The backspace character. More... | |
| static const Char | TAB = Char('\t') |
| The tab character. More... | |
| static const Char | NEWLINE = Char(0x0A) |
| The newline character. More... | |
| static const Char | VERTICAL_TAB = Char('\v') |
| The vertical tab character. More... | |
| static const Char | FORM_FEED = Char('\f') |
| The form feed character. More... | |
| static const Char | RETURN = Char('\r') |
| The carriage return character. More... | |
| static const Char | ESCAPE = Char(27) |
| The escape character. More... | |
| static const Char | SPACE = Char(' ') |
| The space character. More... | |
| static const Char | DELETE = Char(127) |
| The delete character. More... | |
A class representing a UTF-16 character.
| Char | ( | ) |
Construct a new, NUL character.
|
explicit |
Construct a new character with the given ASCII value.
| Char | ( | int | c | ) |
Construct a new character with the given unicode value.
Values above 0xFFFF are truncated.
| ~Char | ( | ) |
Destructor.
| bool isAlphabetic | ( | ) | const |
Tests if the character is alphabetic.
|
static |
Tests if a character is alphabetic.
| bool isAlphaNumeric | ( | ) | const |
Tests if the character is alphanumeric.
|
static |
Tests if a character is alphanumeric.
| bool isASCII | ( | ) | const |
Tests if the character is ASCII.
|
static |
Tests if a character is high ASCII.
| bool isControl | ( | ) | const |
Tests if the character is a control character.
|
static |
Tests if a character is a control character.
| bool isDigit | ( | ) | const |
Tests if the character is a digit.
|
static |
Tests if a character is a digit.
| bool isGraphical | ( | ) | const |
Tests if the character is graphical.
|
static |
Tests if a character is a graphical character.
| bool isHexDigit | ( | ) | const |
Tests if the character is a hexadecimal digit.
|
static |
Tests if a character is a hexadeciaml digit.
| bool isHighASCII | ( | ) | const |
Tests if the character is high ASCII.
|
static |
Tests if a character is high ASCII.
| bool isHighSurrogate | ( | ) | const |
Tests if the character is a high surrogate.
|
static |
Tests if a character is a high surrogate.
| bool isLetter | ( | ) | const |
Tests if the character is a letter.
|
static |
Tests if the character is a letter.
| bool isLowASCII | ( | ) | const |
Tests if the character is low ASCII.
|
static |
Tests if a character is low ASCII.
| bool isLowerCase | ( | ) | const |
Tests if the character is a lowercase letter.
|
static |
Tests if a character is a lowercase letter.
| bool isLowSurrogate | ( | ) | const |
Tests if the character is a low surrogate.
|
static |
Tests if a character is a low surrogate.
| bool isNul | ( | ) | const |
Tests if the character is NUL.
|
static |
Tests if a character is NUL.
| bool isPrintable | ( | ) | const |
Tests if the character is printable.
|
static |
Tests if a character is a printable character.
| bool isPunctuation | ( | ) | const |
Tests if the character is punctuation.
|
static |
Tests if a character is a punctuation character.
| bool isSign | ( | ) | const |
Tests if the character is a sign symbol (+ or -).
|
static |
Tests if a character is a sign symbol (+ or -).
| bool isUpperCase | ( | ) | const |
Tests if the character is an uppercase letter.
|
static |
Tests if a character is an uppercase letter.
| bool isWhitespace | ( | ) | const |
Tests if the character is whitespace.
|
static |
Tests if a character is whitespace.
|
inline |
Equivalent to isNul().
|
inline |
Increment operator (prefix).
|
inline |
Increment operator (postfix).
|
inline |
Decrement operator (prefix).
|
inline |
Decrement operator (postfix).
|
inline |
|
inline |
| Char & operator= | ( | char | c | ) |
Assignment operator.
| Char & operator= | ( | int | c | ) |
Assignment operator.
|
inline |
Equality operator.
|
inline |
Equality operator.
|
inline |
|
inline |
| char toASCII | ( | ) | const |
Returns the ASCII character equivalent for this character, or 0 if this character is not ASCII.
|
static |
Returns the character in ASCII, or NUL if the character is not in the range of ASCII characters.
|
inline |
Returns the char16_t for this character.
| Char toLowerCase | ( | ) | const |
Returns the lowercase form of the character.
| Char toUpperCase | ( | ) | const |
Returns the uppercase form of the character.
|
static |
The NUL character.