20 #ifndef INCLUDED_RTL_CHARACTER_HXX
21 #define INCLUDED_RTL_CHARACTER_HXX
56 #if defined LIBO_INTERNAL_ONLY
58 bool isAscii(
signed char) =
delete;
59 template <
typename T>
inline bool isAscii(T code) {
return isAscii(sal_uInt32(code)); }
74 return code >=
'a' && code <=
'z';
77 #if defined LIBO_INTERNAL_ONLY
98 return code >=
'A' && code <=
'Z';
101 #if defined LIBO_INTERNAL_ONLY
125 #if defined LIBO_INTERNAL_ONLY
143 return code >=
'0' && code <=
'9';
146 #if defined LIBO_INTERNAL_ONLY
167 #if defined LIBO_INTERNAL_ONLY
188 return isAsciiDigit(code) || (code >=
'A' && code <=
'F');
191 #if defined LIBO_INTERNAL_ONLY
215 #if defined LIBO_INTERNAL_ONLY
235 return code >=
'0' && code <=
'7';
238 #if defined LIBO_INTERNAL_ONLY
259 return code ==
' ' || code ==
'\f' || code ==
'\n' || code ==
'\r' || code ==
'\t'
263 #if defined LIBO_INTERNAL_ONLY
286 #if defined LIBO_INTERNAL_ONLY
309 #if defined LIBO_INTERNAL_ONLY
341 sal_uInt32
const surrogatesHighFirst = 0xD800;
342 sal_uInt32
const surrogatesHighLast = 0xDBFF;
343 sal_uInt32
const surrogatesLowFirst = 0xDC00;
344 sal_uInt32
const surrogatesLowLast = 0xDFFF;
359 return code >= detail::surrogatesHighFirst && code <= detail::surrogatesLowLast;
373 return code >= detail::surrogatesHighFirst && code <= detail::surrogatesHighLast;
387 return code >= detail::surrogatesLowFirst && code <= detail::surrogatesLowLast;
401 assert(code >= 0x10000);
402 return static_cast<sal_Unicode>(((code - 0x10000) >> 10) | detail::surrogatesHighFirst);
416 assert(code >= 0x10000);
417 return static_cast<sal_Unicode>(((code - 0x10000) & 0x3FF) | detail::surrogatesLowFirst);
434 return ((high - detail::surrogatesHighFirst) << 10) + (low - detail::surrogatesLowFirst)
453 assert(output != NULL);
sal_uInt16 sal_Unicode
Definition: types.h:119
Definition: bootstrap.hxx:30
bool isAsciiDigit(sal_uInt32 code)
Check for ASCII digit character.
Definition: character.hxx:140
bool isAsciiCanonicHexDigit(sal_uInt32 code)
Check for ASCII canonic hexadecimal digit character.
Definition: character.hxx:185
bool isAsciiAlpha(sal_uInt32 code)
Check for ASCII alphabetic character.
Definition: character.hxx:119
bool isLowSurrogate(sal_uInt32 code)
Check for low surrogate.
Definition: character.hxx:384
bool isAscii(sal_uInt32 code)
Check for ASCII character.
Definition: character.hxx:50
bool isAsciiWhiteSpace(sal_uInt32 code)
Check for ASCII white space character.
Definition: character.hxx:256
std::size_t splitSurrogates(sal_uInt32 code, sal_Unicode *output)
Split a Unicode code point into UTF-16 code units.
Definition: character.hxx:450
bool isAsciiLowerCase(sal_uInt32 code)
Check for ASCII lower case character.
Definition: character.hxx:71
bool isHighSurrogate(sal_uInt32 code)
Check for high surrogate.
Definition: character.hxx:370
bool isAsciiHexDigit(sal_uInt32 code)
Check for ASCII hexadecimal digit character.
Definition: character.hxx:209
bool isAsciiAlphanumeric(sal_uInt32 code)
Check for ASCII alphanumeric character.
Definition: character.hxx:161
bool isAsciiOctalDigit(sal_uInt32 code)
Check for ASCII octal digit character.
Definition: character.hxx:232
bool isAsciiUpperCase(sal_uInt32 code)
Check for ASCII upper case character.
Definition: character.hxx:95
sal_Int32 compareIgnoreAsciiCase(sal_uInt32 code1, sal_uInt32 code2)
Compare two characters ignoring ASCII case.
Definition: character.hxx:330
sal_Unicode getLowSurrogate(sal_uInt32 code)
Get low surrogate half of a non-BMP Unicode code point.
Definition: character.hxx:413
bool isUnicodeScalarValue(sal_uInt32 code)
Check for Unicode scalar value.
Definition: character.hxx:475
sal_Unicode getHighSurrogate(sal_uInt32 code)
Get high surrogate half of a non-BMP Unicode code point.
Definition: character.hxx:398
bool isUnicodeCodePoint(sal_uInt32 code)
Check for Unicode code point.
Definition: character.hxx:40
sal_uInt32 toAsciiLowerCase(sal_uInt32 code)
Convert a character, if ASCII, to lower case.
Definition: character.hxx:303
sal_uInt32 combineSurrogates(sal_uInt32 high, sal_uInt32 low)
Combine surrogates to form a code point.
Definition: character.hxx:430
bool isSurrogate(sal_uInt32 code)
Check for surrogate.
Definition: character.hxx:356
sal_uInt32 toAsciiUpperCase(sal_uInt32 code)
Convert a character, if ASCII, to upper case.
Definition: character.hxx:280