20 #ifndef INCLUDED_RTL_CHARACTER_HXX 21 #define INCLUDED_RTL_CHARACTER_HXX 42 assert(code <= 0x10FFFF);
57 assert(code <= 0x10FFFF);
58 return code >=
'a' && code <=
'z';
72 assert(code <= 0x10FFFF);
73 return code >=
'A' && code <=
'Z';
87 assert(code <= 0x10FFFF);
102 assert(code <= 0x10FFFF);
103 return code >=
'0' && code <=
'9';
117 assert(code <= 0x10FFFF);
132 assert(code <= 0x10FFFF);
133 return isAsciiDigit(code) || (code >=
'A' && code <=
'F');
147 assert(code <= 0x10FFFF);
161 assert(code <= 0x10FFFF);
162 return code >=
'0' && code <=
'7';
176 assert(code <= 0x10FFFF);
190 assert(code <= 0x10FFFF);
208 assert(code1 <= 0x10FFFF);
209 assert(code2 <= 0x10FFFF);
217 sal_uInt32
const surrogatesHighFirst = 0xD800;
218 sal_uInt32
const surrogatesHighLast = 0xDBFF;
219 sal_uInt32
const surrogatesLowFirst = 0xDC00;
220 sal_uInt32
const surrogatesLowLast = 0xDFFF;
234 assert(code <= 0x10FFFF);
235 return code >= detail::surrogatesHighFirst
236 && code <= detail::surrogatesHighLast;
248 assert(code <= 0x10FFFF);
249 return code >= detail::surrogatesLowFirst
250 && code <= detail::surrogatesLowLast;
262 assert(code <= 0x10FFFF);
263 assert(code >= 0x10000);
264 return static_cast<sal_Unicode>(((code - 0x10000) >> 10) | detail::surrogatesHighFirst);
276 assert(code <= 0x10FFFF);
277 assert(code >= 0x10000);
278 return static_cast<sal_Unicode>(((code - 0x10000) & 0x3FF) | detail::surrogatesLowFirst);
294 return ((high - detail::surrogatesHighFirst) << 10)
295 + (low - detail::surrogatesLowFirst) + 0x10000;
bool isAsciiHexDigit(sal_uInt32 code)
Check for ASCII hexadecimal digit character.
Definition: character.hxx:145
bool isAsciiDigit(sal_uInt32 code)
Check for ASCII digit character.
Definition: character.hxx:100
bool isAsciiAlpha(sal_uInt32 code)
Check for ASCII alphabetic character.
Definition: character.hxx:85
bool isAsciiOctalDigit(sal_uInt32 code)
Check for ASCII octal digit character.
Definition: character.hxx:159
sal_uInt32 toAsciiUpperCase(sal_uInt32 code)
Convert a character, if ASCII, to upper case.
Definition: character.hxx:174
bool isAscii(sal_uInt32 code)
Check for ASCII character.
Definition: character.hxx:40
bool isAsciiCanonicHexDigit(sal_uInt32 code)
Check for ASCII canonic hexadecimal digit character.
Definition: character.hxx:130
bool isLowSurrogate(sal_uInt32 code)
Check for low surrogate.
Definition: character.hxx:247
bool isAsciiAlphanumeric(sal_uInt32 code)
Check for ASCII alphanumeric character.
Definition: character.hxx:115
bool isAsciiUpperCase(sal_uInt32 code)
Check for ASCII upper case character.
Definition: character.hxx:70
bool isAsciiLowerCase(sal_uInt32 code)
Check for ASCII lower case character.
Definition: character.hxx:55
sal_uInt32 toAsciiLowerCase(sal_uInt32 code)
Convert a character, if ASCII, to lower case.
Definition: character.hxx:188
sal_uInt16 sal_Unicode
Definition: types.h:155
sal_Unicode getLowSurrogate(sal_uInt32 code)
Get low surrogate half of a non-BMP Unicode code point.
Definition: character.hxx:275
sal_uInt32 combineSurrogates(sal_uInt32 high, sal_uInt32 low)
Combine surrogates to form a code point.
Definition: character.hxx:291
Definition: bootstrap.hxx:29
sal_Int32 compareIgnoreAsciiCase(sal_uInt32 code1, sal_uInt32 code2)
Compare two characters ignoring ASCII case.
Definition: character.hxx:206
sal_Unicode getHighSurrogate(sal_uInt32 code)
Get high surrogate half of a non-BMP Unicode code point.
Definition: character.hxx:261
bool isHighSurrogate(sal_uInt32 code)
Check for high surrogate.
Definition: character.hxx:233