Unicode Character. More...
#include <rchar.h>
Public Member Functions | |
RChar (void) | |
RChar (const char c) | |
RChar (const unsigned char c) | |
RChar (const UChar c) | |
RChar (const long c) | |
RChar (const unsigned int c) | |
RChar (const int c) | |
RChar & | operator= (const char c) |
RChar & | operator= (const unsigned char c) |
RChar & | operator= (const unsigned short c) |
RChar & | operator= (const short c) |
RChar & | operator= (const unsigned int c) |
RChar & | operator= (const int c) |
bool | operator== (const char c) const |
bool | operator== (const RChar c) const |
bool | operator!= (const char c) const |
bool | operator!= (const RChar c) const |
bool | operator< (const char c) const |
bool | operator< (const RChar c) const |
bool | operator<= (const char c) const |
bool | operator<= (const RChar c) const |
bool | operator> (const char c) const |
bool | operator> (const RChar c) const |
bool | operator>= (const char c) const |
bool | operator>= (const RChar c) const |
RChar & | operator+= (const RChar &c) |
RChar & | operator-= (const RChar &c) |
char | Latin1 (void) const |
UChar | Unicode (void) const |
bool | IsNull (void) const |
bool | operator! () const |
bool | IsPrint (void) const |
bool | IsPunct (void) const |
bool | IsSpace (void) const |
bool | IsAlpha (void) const |
bool | IsDigit (void) const |
bool | IsAlNum (void) const |
bool | IsGraph (void) const |
Static Public Member Functions | |
static RChar | ToLower (const RChar c) |
static RChar | ToUpper (const RChar c) |
static size_t | StrLen (const RChar *str) |
static int | StrCmp (const RChar *str1, const RChar *str2) |
static int | StrCmp (const RChar *str1, const char *str2) |
static int | StrCmp (const char *str1, const RChar *str2) |
static int | StrNCmp (const RChar *str1, const RChar *str2, size_t size) |
static int | StrNCmp (const RChar *str1, const char *str2, size_t size) |
static int | StrNCmp (const char *str1, const RChar *str2, size_t size) |
static const RChar * | StrChr (const RChar *str1, const RChar c) |
Private Attributes | |
UChar | Car |
Detailed Description
Unicode Character.
This class implements a unicode character as a class.
Constructor & Destructor Documentation
RChar | ( | void | ) |
Construct a null character.
RChar | ( | const char | c | ) |
Copy constructor.
- Parameters
-
c ASCII/Latin-1 character.
|
explicit |
Copy constructor.
- Parameters
-
c ASCII/Latin-1 character.
|
explicit |
Copy constructor.
- Parameters
-
c Unicode character.
|
explicit |
Copy constructor.
- Parameters
-
c Unicode character.
|
explicit |
Copy constructor.
- Parameters
-
c Unicode character.
Member Function Documentation
RChar& operator= | ( | const char | c | ) |
Assignment operator.
- Parameters
-
c ASCII/Latin-1 character.
RChar& operator= | ( | const unsigned char | c | ) |
Assignment operator.
- Parameters
-
c ASCII/Latin-1 character.
RChar& operator= | ( | const unsigned short | c | ) |
Assignment operator.
- Parameters
-
c Unicode character.
RChar& operator= | ( | const short | c | ) |
Assignment operator.
- Parameters
-
c Unicode character.
RChar& operator= | ( | const unsigned int | c | ) |
Assignment operator.
- Parameters
-
c Unicode character.
RChar& operator= | ( | const int | c | ) |
Assignment operator.
- Parameters
-
c Unicode character.
bool operator== | ( | const char | c | ) | const |
Assignment operator.
- Parameters
-
c Character.
bool operator== | ( | const RChar | c | ) | const |
Comparison == operator.
- Parameters
-
c Character.
bool operator!= | ( | const char | c | ) | const |
Comparison != operator.
- Parameters
-
c Character.
bool operator< | ( | const char | c | ) | const |
Comparison < operator.
- Parameters
-
c Character.
bool operator< | ( | const RChar | c | ) | const |
Comparison < operator.
- Parameters
-
c Character.
bool operator<= | ( | const char | c | ) | const |
Comparison <= operator.
- Parameters
-
c Character.
bool operator<= | ( | const RChar | c | ) | const |
Comparison <= operator.
- Parameters
-
c Character.
bool operator> | ( | const char | c | ) | const |
Comparison > operator.
- Parameters
-
c Character.
bool operator> | ( | const RChar | c | ) | const |
Comparison > operator.
- Parameters
-
c Character.
bool operator>= | ( | const char | c | ) | const |
Comparison >= operator.
- Parameters
-
c Character.
bool operator>= | ( | const RChar | c | ) | const |
Comparison >= operator.
- Parameters
-
c Character.
Substract a character to another one.
- Parameters
-
c Character.
- Returns
char Latin1 | ( | void | ) | const |
Get a Latin1 character.
- Returns
- The character or 0 if is not Latin1.
UChar Unicode | ( | void | ) | const |
Get a Unicode character.
- Returns
- UChar.
bool IsNull | ( | void | ) | const |
Test if the character is a null one.
- Returns
- bool.
bool operator! | ( | ) | const |
Test if the character is a null one.
- Returns
- bool.
bool IsPrint | ( | void | ) | const |
Test if the character is a printable one.
- Returns
- bool.
bool IsPunct | ( | void | ) | const |
Test if the character is a punctuation one.
- Returns
- bool.
bool IsSpace | ( | void | ) | const |
Test if the character is a space one.
- Returns
- bool.
bool IsAlpha | ( | void | ) | const |
Test if the character is a letter.
- Returns
- bool.
bool IsDigit | ( | void | ) | const |
Test if the character is a digit.
- Returns
- bool.
bool IsAlNum | ( | void | ) | const |
Test if the character is alphanumeric.
- Returns
- bool.
bool IsGraph | ( | void | ) | const |
Test if the character is a graphical one.
- Returns
- bool.
Transform an Unicode character in lower case.
- Parameters
-
c Character. return RChar.
Transform an Unicode character in upper case.
- Parameters
-
c Character. return RChar.
|
static |
Compute the length of an array of RChar.
- Returns
- int.
Compare two RChar array.
- Returns
- 0 if the two strings are identical, >0 of the first string is "greater" than the second and <0 else.
|
static |
Compare a RChar array and a "C" string.
- Returns
- 0 if the two strings are identical, >0 of the first string is "greater" than the second and <0 else.
|
static |
Compare a RChar array and a "C" string.
- Returns
- 0 if the two strings are identical, >0 of the first string is "greater" than the second and <0 else.
Compare two RChar array, except that no more than size characters are compared.
- Returns
- 0 if the two strings are identical, >0 of the first string is "greater" than the second and <0 else.
|
static |
Compare a RChar array and a "C" string, except that no more than size characters are compared.
- Returns
- 0 if the two strings are identical, >0 of the first string is "greater" than the second and <0 else.
|
static |
Compare a RChar array and a "C" string, except that no more than size characters are compared.
- Returns
- 0 if the two strings are identical, >0 of the first string is "greater" than the second and <0 else.
Test if a given character is in a string.
- Returns
- 0 if the the character was not found, or point to the first occurrence of the character in the string.
Field Documentation
|
private |
The character.