23 #ifndef __ccxx_Char_hxx 24 #define __ccxx_Char_hxx 41 explicit Char(
char c);
55 Char& operator=(
char c);
61 Char& operator=(
int c);
67 bool isControl()
const;
70 bool isPrintable()
const;
73 bool isGraphical()
const;
76 bool isPunctuation()
const;
79 bool isLetter()
const;
85 bool isHexDigit()
const;
88 bool isAlphabetic()
const;
91 bool isAlphaNumeric()
const;
97 bool isWhitespace()
const;
100 bool isLowerCase()
const;
103 bool isUpperCase()
const;
106 Char toLowerCase()
const;
109 Char toUpperCase()
const;
112 bool isASCII()
const;
115 bool isLowASCII()
const;
118 bool isHighASCII()
const;
121 bool isLowSurrogate()
const;
124 bool isHighSurrogate()
const;
134 char toASCII()
const;
138 {
return(_char == other._char); }
142 {
return(_char == other); }
146 {
return(_char != other._char); }
149 {
return(_char < other._char); }
152 {
return(_char > other._char); }
155 {
return(_char <= other._char); }
158 {
return(_char >= other._char); }
173 {
return(
Char(_char++)); }
184 {
return(
Char(_char--)); }
226 static bool isPrintable(
char16_t c);
229 static bool isGraphical(
char16_t c);
232 static bool isPunctuation(
char16_t c);
244 static bool isAlphabetic(
char16_t c);
247 static bool isAlphaNumeric(
char16_t c);
253 static bool isWhitespace(
char16_t c);
256 static bool isLowerCase(
char16_t c);
259 static bool isUpperCase(
char16_t c);
274 static bool isHighASCII(
char16_t c);
277 static bool isLowSurrogate(
char16_t c);
280 static bool isHighSurrogate(
char16_t c);
294 {
return(static_cast<char16_t>(c1) == c2.
toChar16()); }
297 {
return(static_cast<char16_t>(c1) != c2.
toChar16()); }
300 {
return(static_cast<char16_t>(c1) < c2.
toChar16()); }
303 {
return(static_cast<char16_t>(c1) <= c2.
toChar16()); }
306 {
return(static_cast<char16_t>(c1) > c2.
toChar16()); }
309 {
return(static_cast<char16_t>(c1) >= c2.
toChar16()); }
331 #endif // __ccxx_Char_hxx static const Char SPACE
The space character.
Definition: Char.h++:214
bool operator==(char16_t other) const
Equality operator.
Definition: Char.h++:141
static const Char BELL
The bell character.
Definition: Char.h++:190
Char operator++(int)
Increment operator (postfix).
Definition: Char.h++:172
bool operator<=(const Blob &b1, const Blob &b2)
Definition: Blob.h++:356
bool operator==(const Blob &b1, const Blob &b2)
Definition: Blob.h++:344
static const Char RETURN
The carriage return character.
Definition: Char.h++:208
Char & operator--()
Decrement operator (prefix).
Definition: Char.h++:176
static const Char nul
The NUL character.
Definition: Char.h++:187
Char operator--(int)
Decrement operator (postfix).
Definition: Char.h++:183
bool operator!() const
Equivalent to isNul().
Definition: Char.h++:161
static const Char BACKSPACE
The backspace character.
Definition: Char.h++:193
static const Char TAB
The tab character.
Definition: Char.h++:196
char16_t toChar16() const
Returns the char16_t for this character.
Definition: Char.h++:127
static const Char ESCAPE
The escape character.
Definition: Char.h++:211
bool operator<(const Char &other) const
Definition: Char.h++:148
static const Char NEWLINE
The newline character.
Definition: Char.h++:199
#define COMMONCPP_API
Definition: Common.h++:126
bool operator>=(const Char &other) const
Definition: Char.h++:157
bool operator!=(const Blob &b1, const Blob &b2)
Definition: Blob.h++:347
A class representing a UTF-16 character.
Definition: Char.h++:33
static const Char VERTICAL_TAB
The vertical tab character.
Definition: Char.h++:202
static const Char DELETE
The delete character.
Definition: Char.h++:217
bool operator<(const Blob &b1, const Blob &b2)
Definition: Blob.h++:350
static const Char FORM_FEED
The form feed character.
Definition: Char.h++:205
bool operator<=(const Char &other) const
Definition: Char.h++:154
uint16_t char16_t
A UTF-16 character.
Definition: Common.h++:201
bool operator!=(const Char &other) const
Inequality operator.
Definition: Char.h++:145
bool operator==(const Char &other) const
Equality operator.
Definition: Char.h++:137
Char & operator++()
Increment operator (prefix).
Definition: Char.h++:165
bool operator>=(const Blob &b1, const Blob &b2)
Definition: Blob.h++:359
bool operator>(const Char &other) const
Definition: Char.h++:151
Definition: AllocationMap.c++:25
bool operator>(const Blob &b1, const Blob &b2)
Definition: Blob.h++:353