Public Member Functions |
| VChar () |
| Constructs a character with value zero.
|
| VChar (char c) |
| Constructs a character from a char.
|
| VChar (int i) |
| Constructs a character from an int for conversion purposes.
|
VChar & | operator= (char c) |
| Assigns the character from a C char.
|
VChar & | operator= (int i) |
| Assigns the character from an int specifying the 8-bit char value.
|
bool | isLowerCase () const |
| Returns true if the character is a lower case character.
|
VChar | lowerCase () const |
| Returns a lower-case version of the character.
|
void | toLowerCase () |
| Converts the character to lower-case.
|
bool | isUpperCase () const |
| Returns true if the character is an upper case character.
|
VChar | upperCase () const |
| Returns an upper-case version of the character.
|
void | toUpperCase () |
| Converts the character to upper-case.
|
char | charValue () const |
| Returns the char value of the character.
|
int | intValue () const |
| Returns the int value of the character.
|
void | set (char c) |
| Sets the character from a char, as in the char constructor.
|
void | set (int i) |
| Sets the character from an int, as in the int constructor.
|
| operator char () const |
| Coerces the character to a char.
|
bool | isAlpha () const |
| Returns true if the character is A-Z or a-z.
|
bool | isNumeric () const |
| Returns true if the character is a digit.
|
bool | isAlphaNumeric () const |
| Returns true if the character is alpha or numeric.
|
bool | isWhitespace () const |
| Returns true if the character is non-printing.
|
bool | isHexadecimal () const |
| Returns true if the character is 0-9, A-F, or a-f.
|
Static Public Member Functions |
static const VChar & | NULL_CHAR () |
| Returns a reference to the read-only null character value.
|
static bool | equalsIgnoreCase (const VChar &c1, const VChar &c2) |
| Returns true if two characters are equal regardless of case.
|
static bool | equalsIgnoreCase (const VChar &c1, char c2) |
| Returns true if two characters are equal regardless of case.
|
static bool | equalsIgnoreCase (char c1, const VChar &c2) |
| Returns true if two characters are equal regardless of case.
|
static bool | equalsIgnoreCase (char c1, char c2) |
| Returns true if two characters are equal regardless of case.
|
Friends |
bool | operator== (const VChar &lhs, const VChar &rhs) |
| Compares lhs and rhs.
|
bool | operator== (const VChar &lhs, char rhs) |
| Compares lhs and rhs.
|
bool | operator== (char lhs, const VChar &rhs) |
| Compares lhs and rhs.
|
bool | operator!= (const VChar &lhs, const VChar &rhs) |
| Compares lhs and rhs.
|
bool | operator!= (const VChar &lhs, char rhs) |
| Compares lhs and rhs.
|
bool | operator!= (char lhs, const VChar &rhs) |
| Compares lhs and rhs.
|
bool | operator< (const VChar &lhs, const VChar &rhs) |
| Compares lhs and rhs.
|
bool | operator< (const VChar &lhs, char rhs) |
| Compares lhs and rhs.
|
bool | operator< (char lhs, const VChar &rhs) |
| Compares lhs and rhs.
|
bool | operator<= (const VChar &lhs, const VChar &rhs) |
| Compares lhs and rhs.
|
bool | operator<= (const VChar &lhs, char rhs) |
| Compares lhs and rhs.
|
bool | operator<= (char lhs, const VChar &rhs) |
| Compares lhs and rhs.
|
bool | operator>= (const VChar &lhs, const VChar &rhs) |
| Compares lhs and rhs.
|
bool | operator>= (const VChar &lhs, char rhs) |
| Compares lhs and rhs.
|
bool | operator>= (char lhs, const VChar &rhs) |
| Compares lhs and rhs.
|
bool | operator> (const VChar &lhs, const VChar &rhs) |
| Compares lhs and rhs.
|
bool | operator> (const VChar &lhs, char rhs) |
| Compares lhs and rhs.
|
bool | operator> (char lhs, const VChar &rhs) |
| Compares lhs and rhs.
|
VChar is a simple wrapper for C char values.
It provides easier and safer ways of setting, converting, comparing, and modifying characters.
This class does not attempt to do lexical comparisons or deal with Unicode or character set issues. It is simply a lightweight object replacement for using char values directly in source code.
- See also:
- VString
Definition at line 35 of file vchar.h.