6#ifdef QT_NO_CAST_FROM_ASCII
7# undef QT_NO_CAST_FROM_ASCII
9#ifdef QT_NO_CAST_TO_ASCII
10# undef QT_NO_CAST_TO_ASCII
23#define FLAG(x) (1 << (x))
761 if (ucs4 > LastValidCodePoint)
763 const int test =
FLAG(Other_Control) |
765 FLAG(Other_Surrogate) |
766 FLAG(Other_PrivateUse) |
767 FLAG(Other_NotAssigned);
794bool QT_FASTCALL QChar::isSpace_helper(
char32_t ucs4)
noexcept
796 if (ucs4 > LastValidCodePoint)
798 const int test =
FLAG(Separator_Space) |
799 FLAG(Separator_Line) |
800 FLAG(Separator_Paragraph);
824 if (ucs4 > LastValidCodePoint)
826 const int test =
FLAG(Mark_NonSpacing) |
827 FLAG(Mark_SpacingCombining) |
828 FLAG(Mark_Enclosing);
850 if (ucs4 > LastValidCodePoint)
852 const int test =
FLAG(Punctuation_Connector) |
853 FLAG(Punctuation_Dash) |
854 FLAG(Punctuation_Open) |
855 FLAG(Punctuation_Close) |
856 FLAG(Punctuation_InitialQuote) |
857 FLAG(Punctuation_FinalQuote) |
858 FLAG(Punctuation_Other);
880 if (ucs4 > LastValidCodePoint)
882 const int test =
FLAG(Symbol_Math) |
883 FLAG(Symbol_Currency) |
884 FLAG(Symbol_Modifier) |
910bool QT_FASTCALL QChar::isLetter_helper(
char32_t ucs4)
noexcept
912 if (ucs4 > LastValidCodePoint)
914 const int test =
FLAG(Letter_Uppercase) |
915 FLAG(Letter_Lowercase) |
916 FLAG(Letter_Titlecase) |
917 FLAG(Letter_Modifier) |
947bool QT_FASTCALL QChar::isNumber_helper(
char32_t ucs4)
noexcept
949 if (ucs4 > LastValidCodePoint)
951 const int test =
FLAG(Number_DecimalDigit) |
952 FLAG(Number_Letter) |
978bool QT_FASTCALL QChar::isLetterOrNumber_helper(
char32_t ucs4)
noexcept
980 if (ucs4 > LastValidCodePoint)
982 const int test =
FLAG(Letter_Uppercase) |
983 FLAG(Letter_Lowercase) |
984 FLAG(Letter_Titlecase) |
985 FLAG(Letter_Modifier) |
987 FLAG(Number_DecimalDigit) |
988 FLAG(Number_Letter) |
1165 if (ucs4 > LastValidCodePoint)
1184 if (ucs4 > LastValidCodePoint)
1203 if (ucs4 > LastValidCodePoint)
1228 if (ucs4 > LastValidCodePoint)
1259 if (ucs4 > LastValidCodePoint)
1349 if (ucs4 > LastValidCodePoint)
1381 if (
index == 0xffff) {
1389 *
length = (*decomposition) >> 8;
1390 return reinterpret_cast<const QChar *
>(decomposition + 1);
1437 if (
index == 0xffff)
1462 if (ucs4 > LastValidCodePoint)
1485 if (ucs4 > LastValidCodePoint)
1505 if (ucs4 > LastValidCodePoint)
1525 auto begin()
const {
return chars; }
1526 auto end()
const {
return chars + sz; }
1528 auto data()
const {
return chars; }
1529 auto size()
const {
return sz; }
1536 const auto caseDiff = fold.
diff;
1540 auto length = *specialCase++;
1542 *pp++ = *specialCase++;
1552template <
typename T>
1560 return *specialCase == 1 ? specialCase[1] : uc;
1563 return uc + fold.diff;
1583 if (ucs4 > LastValidCodePoint)
1605 if (ucs4 > LastValidCodePoint)
1627 if (ucs4 > LastValidCodePoint)
1634 char32_t ucs4 = *
ch;
1640static inline char32_t foldCase(
char32_t ch,
char32_t &last)
noexcept
1675 if (ucs4 > LastValidCodePoint)
1703#ifndef QT_NO_DATASTREAM
1820 const unsigned short *utf16 =
reinterpret_cast<unsigned short *
>(
s.data());
1821 const unsigned short *uc = utf16 +
s.
size();
1822 while (uc != utf16 + from) {
1823 char32_t ucs4 = *(--uc);
1842 utf16 =
reinterpret_cast<unsigned short *
>(
s.data());
1854{
return ligature1.
u1 < ligature2.
u1; }
1856{
return u1 < ligature.
u1; }
1858{
return ligature.
u1 <
u1; }
1893 if (
index == 0xffff)
1916 if (from < 0 ||
s.size() - from < 2)
1919 char32_t stcode = 0;
1922 int lastCombining = 255;
1925 while (
pos <
s.size()) {
1927 char32_t uc =
s.at(
pos).unicode();
1928 if (
QChar(uc).isHighSurrogate() &&
pos <
s.size()-1) {
1930 if (
QChar(low).isLowSurrogate()) {
1937 if (
p->unicodeVersion > version) {
1940 lastCombining = 255;
1945 int combining =
p->combiningClass;
1946 if ((
i ==
next || combining > lastCombining) && starter >= from) {
1955 d[starter +
j++] =
ch;
1960 if (combining == 0) {
1965 lastCombining = combining;
1983 u1 =
s.at(
pos).unicode();
1985 const char16_t low =
s.at(
p2).unicode();
1996 u2 =
s.at(
p2).unicode();
1998 const char16_t low =
s.at(
p2+1).unicode();
2008 if (
p->unicodeVersion <= version)
2009 c2 =
p->combiningClass;
2018 if (
p->unicodeVersion <= version)
2019 c1 =
p->combiningClass;
2032 if (
pos > 0 &&
s.at(
pos).isLowSurrogate())
2061 enum { NFQC_YES = 0, NFQC_NO = 1, NFQC_MAYBE = 3 };
2063 const auto *
string =
reinterpret_cast<const char16_t *
>(
str->
constData());
2070 uchar lastCombining = 0;
2073 char32_t uc =
string[
i];
2095 if (
p->combiningClass < lastCombining &&
p->combiningClass > 0)
2098 const uchar check = (
p->nfQuickCheck >> (
mode << 1)) & 0x03;
2099 if (check != NFQC_YES)
2102 lastCombining =
p->combiningClass;
2103 if (lastCombining == 0)
2108 *lastStable =
str->
size() - 1;
static constexpr char32_t surrogateToUcs4(char16_t high, char16_t low) noexcept
Converts a UTF16 surrogate pair with the given high and low values to it's UCS-4-encoded code point.
static constexpr bool requiresSurrogates(char32_t ucs4) noexcept
Returns true if the UCS-4-encoded character specified by ucs4 can be split into the high and low part...
Decomposition
This enum type defines the Unicode decomposition attributes.
Script script() const noexcept
QChar toLower() const noexcept
Returns the lowercase equivalent if the character is uppercase or titlecase; otherwise returns the ch...
int digitValue() const noexcept
Returns the numeric value of the digit, or -1 if the character is not a digit.
Direction direction() const noexcept
Returns the character's direction.
bool hasMirrored() const noexcept
Returns true if the character should be reversed if the text direction is reversed; otherwise returns...
static constexpr auto fromUcs4(char32_t c) noexcept
Direction
This enum type defines the Unicode direction attributes.
QChar mirroredChar() const noexcept
Returns the mirrored character if this character is a mirrored character; otherwise returns the chara...
UnicodeVersion
Specifies which version of the \l{Unicode standard} introduced a certain character.
Category
This enum maps the Unicode character categories.
constexpr bool isLowSurrogate() const noexcept
Returns true if the QChar is the low part of a UTF16 surrogate (for example if its code point is in r...
QDataStream & operator<<(QDataStream &out, QChar chr)
Writes the char chr to the stream out.
constexpr char16_t unicode() const noexcept
Returns the numeric Unicode value of the QChar.
QChar toCaseFolded() const noexcept
Returns the case folded equivalent of the character.
bool isPrint() const noexcept
Returns true if the character is a printable character; otherwise returns false.
QString decomposition() const
Decomposes a character into it's constituent parts.
Category category() const noexcept
Returns the character's category.
unsigned char combiningClass() const noexcept
Returns the combining class for the character as defined in the Unicode standard.
Decomposition decompositionTag() const noexcept
Returns the tag defining the composition of the character.
QChar toTitleCase() const noexcept
Returns the title case equivalent if the character is lowercase or uppercase; otherwise returns the c...
QChar toUpper() const noexcept
Returns the uppercase equivalent if the character is lowercase or titlecase; otherwise returns the ch...
JoiningType joiningType() const noexcept
bool isPunct() const noexcept
Returns true if the character is a punctuation mark (Punctuation_* categories); otherwise returns fal...
UnicodeVersion unicodeVersion() const noexcept
Returns the Unicode version that introduced this character.
constexpr bool isHighSurrogate() const noexcept
Returns true if the QChar is the high part of a UTF16 surrogate (for example if its code point is in ...
bool isSymbol() const noexcept
Returns true if the character is a symbol (Symbol_* categories); otherwise returns false.
QDataStream & operator>>(QDataStream &in, QChar &chr)
Reads a char from the stream in into char chr.
bool isMark() const noexcept
Returns true if the character is a mark (Mark_* categories); otherwise returns false.
static UnicodeVersion QT_FASTCALL currentUnicodeVersion() noexcept Q_DECL_CONST_FUNCTION
Returns the most recent supported Unicode version.
\inmodule QtCore\reentrant
\macro QT_RESTRICTED_CAST_FROM_ASCII
const QChar * constData() const
Returns a pointer to the data stored in the QString.
qsizetype size() const
Returns the number of characters in this string.
NormalizationForm
This enum describes the various normalized forms of Unicode text.
const QLoggingCategory & category()
[1]
Combined button and popup list for selecting options.
static constexpr unsigned short uc_decomposition_map[]
static Q_DECL_CONST_FUNCTION const Properties * qGetProp(char32_t ucs4) noexcept
static constexpr unsigned short specialCaseMap[]
constexpr unsigned int MaxSpecialCaseLength
static constexpr unsigned short uc_ligature_map[]
static constexpr char32_t Hangul_SBase
static char32_t ligatureHelper(char32_t u1, char32_t u2)
static void canonicalOrderHelper(QString *str, QChar::UnicodeVersion version, qsizetype from)
static Q_DECL_CONST_FUNCTION T convertCase_helper(T uc, QUnicodeTables::Case which) noexcept
static constexpr quint32 Hangul_VCount
static constexpr quint32 Hangul_SCount
bool operator<(const UCS2Pair &ligature1, const UCS2Pair &ligature2)
static auto fullConvertCase(char32_t uc, QUnicodeTables::Case which) noexcept
static constexpr quint32 Hangul_NCount
static constexpr char32_t Hangul_TBase
static void decomposeHelper(QString *str, bool canonical, QChar::UnicodeVersion version, qsizetype from)
static void composeHelper(QString *str, QChar::UnicodeVersion version, qsizetype from)
static constexpr char32_t Hangul_VBase
static constexpr quint32 Hangul_TCount
static const QChar *QT_FASTCALL decompositionHelper(char32_t ucs4, qsizetype *length, QChar::Decomposition *tag, QChar *buffer)
static bool normalizationQuickCheckHelper(QString *str, QString::NormalizationForm mode, qsizetype from, qsizetype *lastStable)
static constexpr quint32 Hangul_LCount
static constexpr char32_t Hangul_LBase
static char32_t foldCase(const char16_t *ch, const char16_t *start)
#define Q_DECL_CONST_FUNCTION
AudioChannelLayoutTag tag
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLuint GLenum GLsizei length
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIterator begin(const QRegularExpressionMatchIterator &iterator)
QT_BEGIN_NAMESPACE typedef signed char qint8
#define GET_LIGATURE_INDEX(ucs4)
#define GET_DECOMPOSITION_INDEX(ucs4)
#define UNICODE_DATA_VERSION
QTextStream out(stdout)
[7]
struct QUnicodeTables::Properties::@144 cases[NumCases]