![]() |
Qt 6.x
The Qt SDK
|
\inmodule QtCore More...
#include <qchar.h>
Public Member Functions | |
constexpr Q_IMPLICIT | QChar () noexcept |
Constructs a null QChar ('\0'). | |
constexpr Q_IMPLICIT | QChar (ushort rc) noexcept |
Constructs a QChar for the character with Unicode code point code. | |
constexpr QCHAR_MAYBE_IMPLICIT | QChar (uchar c, uchar r) noexcept |
Constructs a QChar for Unicode cell cell in row row. | |
constexpr Q_IMPLICIT | QChar (short rc) noexcept |
Constructs a QChar for the character with Unicode code point code. | |
constexpr QCHAR_MAYBE_IMPLICIT | QChar (uint rc) noexcept |
Constructs a QChar for the character with Unicode code point code. | |
constexpr QCHAR_MAYBE_IMPLICIT | QChar (int rc) noexcept |
Constructs a QChar for the character with Unicode code point code. | |
constexpr Q_IMPLICIT | QChar (SpecialCharacter s) noexcept |
Constructs a QChar for the predefined character value ch. | |
constexpr Q_IMPLICIT | QChar (QLatin1Char ch) noexcept |
Constructs a QChar corresponding to ASCII/Latin-1 character ch. | |
constexpr Q_IMPLICIT | QChar (char16_t ch) noexcept |
QT_ASCII_CAST_WARN constexpr Q_IMPLICIT | QChar (char c) noexcept |
Constructs a QChar corresponding to ASCII/Latin-1 character ch. | |
QT_ASCII_CAST_WARN constexpr QCHAR_MAYBE_IMPLICIT | QChar (uchar c) noexcept |
Constructs a QChar corresponding to ASCII/Latin-1 character ch. | |
Category | category () const noexcept |
Returns the character's category. | |
Direction | direction () const noexcept |
Returns the character's direction. | |
JoiningType | joiningType () const noexcept |
unsigned char | combiningClass () const noexcept |
Returns the combining class for the character as defined in the Unicode standard. | |
QChar | mirroredChar () const noexcept |
Returns the mirrored character if this character is a mirrored character; otherwise returns the character itself. | |
bool | hasMirrored () const noexcept |
Returns true if the character should be reversed if the text direction is reversed; otherwise returns false . | |
QString | decomposition () const |
Decomposes a character into it's constituent parts. | |
Decomposition | decompositionTag () const noexcept |
Returns the tag defining the composition of the character. | |
int | digitValue () const noexcept |
Returns the numeric value of the digit, or -1 if the character is not a digit. | |
QChar | toLower () const noexcept |
Returns the lowercase equivalent if the character is uppercase or titlecase; otherwise returns the character itself. | |
QChar | toUpper () const noexcept |
Returns the uppercase equivalent if the character is lowercase or titlecase; otherwise returns the character itself. | |
QChar | toTitleCase () const noexcept |
Returns the title case equivalent if the character is lowercase or uppercase; otherwise returns the character itself. | |
QChar | toCaseFolded () const noexcept |
Returns the case folded equivalent of the character. | |
Script | script () const noexcept |
UnicodeVersion | unicodeVersion () const noexcept |
Returns the Unicode version that introduced this character. | |
constexpr char | toLatin1 () const noexcept |
Returns the Latin-1 character equivalent to the QChar, or 0. | |
constexpr char16_t | unicode () const noexcept |
Returns the numeric Unicode value of the QChar. | |
constexpr char16_t & | unicode () noexcept |
Returns a reference to the numeric Unicode value of the QChar. | |
constexpr bool | isNull () const noexcept |
Returns true if the character is the Unicode character 0x0000 ('\0'); otherwise returns false . | |
bool | isPrint () const noexcept |
Returns true if the character is a printable character; otherwise returns false . | |
constexpr bool | isSpace () const noexcept |
Returns true if the character is a separator character (Separator_* categories or certain code points from Other_Control category); otherwise returns false . | |
bool | isMark () const noexcept |
Returns true if the character is a mark (Mark_* categories); otherwise returns false . | |
bool | isPunct () const noexcept |
Returns true if the character is a punctuation mark (Punctuation_* categories); otherwise returns false . | |
bool | isSymbol () const noexcept |
Returns true if the character is a symbol (Symbol_* categories); otherwise returns false . | |
constexpr bool | isLetter () const noexcept |
Returns true if the character is a letter (Letter_* categories); otherwise returns false . | |
constexpr bool | isNumber () const noexcept |
Returns true if the character is a number (Number_* categories, not just 0-9); otherwise returns false . | |
constexpr bool | isLetterOrNumber () const noexcept |
Returns true if the character is a letter or number (Letter_* or Number_* categories); otherwise returns false . | |
constexpr bool | isDigit () const noexcept |
Returns true if the character is a decimal digit (Number_DecimalDigit); otherwise returns false . | |
constexpr bool | isLower () const noexcept |
Returns true if the character is a lowercase letter, for example category() is Letter_Lowercase. | |
constexpr bool | isUpper () const noexcept |
Returns true if the character is an uppercase letter, for example category() is Letter_Uppercase. | |
constexpr bool | isTitleCase () const noexcept |
Returns true if the character is a titlecase letter, for example category() is Letter_Titlecase. | |
constexpr bool | isNonCharacter () const noexcept |
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 range [0xd800..0xdbff]); false otherwise. | |
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 range [0xdc00..0xdfff]); false otherwise. | |
constexpr bool | isSurrogate () const noexcept |
constexpr uchar | cell () const noexcept |
Returns the cell (least significant byte) of the Unicode character. | |
constexpr uchar | row () const noexcept |
Returns the row (most significant byte) of the Unicode character. | |
constexpr void | setCell (uchar acell) noexcept |
constexpr void | setRow (uchar arow) noexcept |
Static Public Member Functions | |
static constexpr QChar | fromUcs2 (char16_t c) noexcept |
static constexpr auto | fromUcs4 (char32_t c) noexcept |
static constexpr QChar | fromLatin1 (char c) noexcept |
Converts the Latin-1 character c to its equivalent QChar. | |
static constexpr bool | isNonCharacter (char32_t ucs4) noexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
static constexpr bool | isHighSurrogate (char32_t ucs4) noexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns true if the UCS-4-encoded character specified by ucs4 is the high part of a UTF16 surrogate (for example if its code point is in range [0xd800..0xdbff]); false otherwise. | |
static constexpr bool | isLowSurrogate (char32_t ucs4) noexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns true if the UCS-4-encoded character specified by ucs4 is the low part of a UTF16 surrogate (for example if its code point is in range [0xdc00..0xdfff]); false otherwise. | |
static constexpr bool | isSurrogate (char32_t ucs4) noexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
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 parts of a UTF16 surrogate (for example if its code point is greater than or equals to 0x10000); false otherwise. | |
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 char32_t | surrogateToUcs4 (QChar high, QChar low) noexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Converts a UTF16 surrogate pair (high, low) to it's UCS-4-encoded code point. | |
static constexpr char16_t | highSurrogate (char32_t ucs4) noexcept |
Returns the high surrogate part of a UCS-4-encoded code point. | |
static constexpr char16_t | lowSurrogate (char32_t ucs4) noexcept |
Returns the low surrogate part of a UCS-4-encoded code point. | |
static Category QT_FASTCALL | category (char32_t ucs4) noexcept Q_DECL_CONST_FUNCTION |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Returns the category of the UCS-4-encoded character specified by ucs4. | |
static Direction QT_FASTCALL | direction (char32_t ucs4) noexcept Q_DECL_CONST_FUNCTION |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Returns the direction of the UCS-4-encoded character specified by ucs4. | |
static JoiningType QT_FASTCALL | joiningType (char32_t ucs4) noexcept Q_DECL_CONST_FUNCTION |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
static unsigned char QT_FASTCALL | combiningClass (char32_t ucs4) noexcept Q_DECL_CONST_FUNCTION |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Returns the combining class for the UCS-4-encoded character specified by ucs4, as defined in the Unicode standard. | |
static char32_t QT_FASTCALL | mirroredChar (char32_t ucs4) noexcept Q_DECL_CONST_FUNCTION |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Returns the mirrored character if the UCS-4-encoded character specified by ucs4 is a mirrored character; otherwise returns the character itself. | |
static bool QT_FASTCALL | hasMirrored (char32_t ucs4) noexcept Q_DECL_CONST_FUNCTION |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
static QString QT_FASTCALL | decomposition (char32_t ucs4) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Decomposes the UCS-4-encoded character specified by ucs4 into it's constituent parts. | |
static Decomposition QT_FASTCALL | decompositionTag (char32_t ucs4) noexcept Q_DECL_CONST_FUNCTION |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Returns the tag defining the composition of the UCS-4-encoded character specified by ucs4. | |
static int QT_FASTCALL | digitValue (char32_t ucs4) noexcept Q_DECL_CONST_FUNCTION |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Returns the numeric value of the digit specified by the UCS-4-encoded character, ucs4, or -1 if the character is not a digit. | |
static char32_t QT_FASTCALL | toLower (char32_t ucs4) noexcept Q_DECL_CONST_FUNCTION |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Returns the lowercase equivalent of the UCS-4-encoded character specified by ucs4 if the character is uppercase or titlecase; otherwise returns the character itself. | |
static char32_t QT_FASTCALL | toUpper (char32_t ucs4) noexcept Q_DECL_CONST_FUNCTION |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Returns the uppercase equivalent of the UCS-4-encoded character specified by ucs4 if the character is lowercase or titlecase; otherwise returns the character itself. | |
static char32_t QT_FASTCALL | toTitleCase (char32_t ucs4) noexcept Q_DECL_CONST_FUNCTION |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Returns the title case equivalent of the UCS-4-encoded character specified by ucs4 if the character is lowercase or uppercase; otherwise returns the character itself. | |
static char32_t QT_FASTCALL | toCaseFolded (char32_t ucs4) noexcept Q_DECL_CONST_FUNCTION |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Returns the case folded equivalent of the UCS-4-encoded character specified by ucs4. | |
static Script QT_FASTCALL | script (char32_t ucs4) noexcept Q_DECL_CONST_FUNCTION |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
static UnicodeVersion QT_FASTCALL | unicodeVersion (char32_t ucs4) noexcept Q_DECL_CONST_FUNCTION |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Returns the Unicode version that introduced the character specified in its UCS-4-encoded form as ucs4. | |
static UnicodeVersion QT_FASTCALL | currentUnicodeVersion () noexcept Q_DECL_CONST_FUNCTION |
Returns the most recent supported Unicode version. | |
static bool QT_FASTCALL | isPrint (char32_t ucs4) noexcept Q_DECL_CONST_FUNCTION |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
static constexpr bool | isSpace (char32_t ucs4) noexcept Q_DECL_CONST_FUNCTION |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
static bool QT_FASTCALL | isMark (char32_t ucs4) noexcept Q_DECL_CONST_FUNCTION |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
static bool QT_FASTCALL | isPunct (char32_t ucs4) noexcept Q_DECL_CONST_FUNCTION |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
static bool QT_FASTCALL | isSymbol (char32_t ucs4) noexcept Q_DECL_CONST_FUNCTION |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
static constexpr bool | isLetter (char32_t ucs4) noexcept Q_DECL_CONST_FUNCTION |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
static constexpr bool | isNumber (char32_t ucs4) noexcept Q_DECL_CONST_FUNCTION |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
static constexpr bool | isLetterOrNumber (char32_t ucs4) noexcept Q_DECL_CONST_FUNCTION |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
static constexpr bool | isDigit (char32_t ucs4) noexcept Q_DECL_CONST_FUNCTION |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
static constexpr bool | isLower (char32_t ucs4) noexcept Q_DECL_CONST_FUNCTION |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
static constexpr bool | isUpper (char32_t ucs4) noexcept Q_DECL_CONST_FUNCTION |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
static constexpr bool | isTitleCase (char32_t ucs4) noexcept Q_DECL_CONST_FUNCTION |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
Friends | |
constexpr bool | operator== (QChar c1, QChar c2) noexcept |
Returns true if c1 and c2 are the same Unicode character; otherwise returns false . | |
constexpr bool | operator< (QChar c1, QChar c2) noexcept |
Returns true if the numeric Unicode value of c1 is less than that of c2; otherwise returns false . | |
constexpr bool | operator!= (QChar c1, QChar c2) noexcept |
Returns true if c1 and c2 are not the same Unicode character; otherwise returns false . | |
constexpr bool | operator>= (QChar c1, QChar c2) noexcept |
Returns true if the numeric Unicode value of c1 is greater than or equal to that of c2; otherwise returns false . | |
constexpr bool | operator> (QChar c1, QChar c2) noexcept |
Returns true if the numeric Unicode value of c1 is greater than that of c2; otherwise returns false . | |
constexpr bool | operator<= (QChar c1, QChar c2) noexcept |
Returns true if the numeric Unicode value of c1 is less than or equal to that of c2; otherwise returns false . | |
constexpr bool | operator== (QChar lhs, std::nullptr_t) noexcept |
constexpr bool | operator< (QChar, std::nullptr_t) noexcept |
constexpr bool | operator== (std::nullptr_t, QChar rhs) noexcept |
constexpr bool | operator< (std::nullptr_t, QChar rhs) noexcept |
constexpr bool | operator!= (QChar lhs, std::nullptr_t) noexcept |
constexpr bool | operator>= (QChar lhs, std::nullptr_t) noexcept |
constexpr bool | operator> (QChar lhs, std::nullptr_t) noexcept |
constexpr bool | operator<= (QChar lhs, std::nullptr_t) noexcept |
constexpr bool | operator!= (std::nullptr_t, QChar rhs) noexcept |
constexpr bool | operator>= (std::nullptr_t, QChar rhs) noexcept |
constexpr bool | operator> (std::nullptr_t, QChar rhs) noexcept |
constexpr bool | operator<= (std::nullptr_t, QChar rhs) noexcept |
Related Symbols | |
(Note that these are not member symbols.) | |
QDataStream & | operator<< (QDataStream &out, QChar chr) |
Writes the char chr to the stream out. | |
QDataStream & | operator>> (QDataStream &in, QChar &chr) |
Reads a char from the stream in into char chr. | |
\inmodule QtCore
The QChar class provides a 16-bit Unicode character.
\reentrant
In Qt, Unicode characters are 16-bit entities without any markup or structure. This class represents such an entity. It is lightweight, so it can be used everywhere. Most compilers treat it like an {unsigned short}.
QChar provides a full complement of testing/classification functions, converting to and from other formats, converting from composed to decomposed Unicode, and trying to compare and case-convert if you ask it to.
The classification functions include functions like those in the standard C++ header <cctype> (formerly <ctype.h>), but operating on the full range of Unicode characters, not just for the ASCII range. They all return true if the character is a certain type of character; otherwise they return false. These classification functions are isNull() (returns true
if the character is '\0'), isPrint() (true if the character is any sort of printable character, including whitespace), isPunct() (any sort of punctation), isMark() (Unicode Mark), isLetter() (a letter), isNumber() (any sort of numeric character, not just 0-9), isLetterOrNumber(), and isDigit() (decimal digits). All of these are wrappers around category() which return the Unicode-defined category of each character. Some of these also calculate the derived properties (for example isSpace() returns true
if the character is of category Separator_* or an exceptional code point from Other_Control category).
QChar also provides direction(), which indicates the "natural" writing direction of this character. The joiningType() function indicates how the character joins with it's neighbors (needed mostly for Arabic or Syriac) and finally hasMirrored(), which indicates whether the character needs to be mirrored when it is printed in it's "unnatural" writing direction.
Composed Unicode characters (like ring) can be converted to decomposed Unicode ("a" followed by "ring above") by using decomposition().
In Unicode, comparison is not necessarily possible and case conversion is very difficult at best. Unicode, covering the "entire" world, also includes most of the world's case and sorting problems. operator==() and friends will do comparison based purely on the numeric Unicode value (code point) of the characters, and toUpper() and toLower() will do case changes when the character has a well-defined uppercase/lowercase equivalent. For locale-dependent comparisons, use QString::localeAwareCompare().
The conversion functions include unicode() (to a scalar), toLatin1() (to scalar, but converts all non-Latin-1 characters to 0), row() (gives the Unicode row), cell() (gives the Unicode cell), digitValue() (gives the integer value of any of the numerous digit characters), and a host of constructors.
QChar provides constructors and cast operators that make it easy to convert to and from traditional 8-bit {char}s. If you defined
QT_NO_CAST_FROM_ASCII
and QT_NO_CAST_TO_ASCII
, as explained in the QString documentation, you will need to explicitly call fromLatin1(), or use QLatin1Char, to construct a QChar from an 8-bit char
, and you will need to call toLatin1() to get the 8-bit value back.
Starting with Qt 6.0, most QChar constructors are explicit
. This is done to avoid dangerous mistakes when accidentally mixing integral types and strings. You can opt-out (and make these constructors implicit) by defining the macro QT_IMPLICIT_QCHAR_CONSTRUCTION
.
For more information see \l{https://www.unicode.org/ucd/}{"About the Unicode Character Database"}.
enum QChar::Category |
This enum maps the Unicode character categories.
The following characters are normative in Unicode:
\value Mark_NonSpacing Unicode class name Mn
\value Mark_SpacingCombining Unicode class name Mc
\value Mark_Enclosing Unicode class name Me
\value Number_DecimalDigit Unicode class name Nd
\value Number_Letter Unicode class name Nl
\value Number_Other Unicode class name No
\value Separator_Space Unicode class name Zs
\value Separator_Line Unicode class name Zl
\value Separator_Paragraph Unicode class name Zp
\value Other_Control Unicode class name Cc
\value Other_Format Unicode class name Cf
\value Other_Surrogate Unicode class name Cs
\value Other_PrivateUse Unicode class name Co
\value Other_NotAssigned Unicode class name Cn
The following categories are informative in Unicode:
\value Letter_Uppercase Unicode class name Lu
\value Letter_Lowercase Unicode class name Ll
\value Letter_Titlecase Unicode class name Lt
\value Letter_Modifier Unicode class name Lm
\value Letter_Other Unicode class name Lo
\value Punctuation_Connector Unicode class name Pc
\value Punctuation_Dash Unicode class name Pd
\value Punctuation_Open Unicode class name Ps
\value Punctuation_Close Unicode class name Pe
\value Punctuation_InitialQuote Unicode class name Pi
\value Punctuation_FinalQuote Unicode class name Pf
\value Punctuation_Other Unicode class name Po
\value Symbol_Math Unicode class name Sm
\value Symbol_Currency Unicode class name Sc
\value Symbol_Modifier Unicode class name Sk
\value Symbol_Other Unicode class name So
This enum type defines names for some of the Unicode combining classes. See the \l{Unicode Standard} for a description of the values.
\value Combining_Above \value Combining_AboveAttached \value Combining_AboveLeft \value Combining_AboveLeftAttached \value Combining_AboveRight \value Combining_AboveRightAttached \value Combining_Below \value Combining_BelowAttached \value Combining_BelowLeft \value Combining_BelowLeftAttached \value Combining_BelowRight \value Combining_BelowRightAttached \value Combining_DoubleAbove \value Combining_DoubleBelow \value Combining_IotaSubscript \value Combining_Left \value Combining_LeftAttached \value Combining_Right \value Combining_RightAttached
enum QChar::Decomposition |
This enum type defines the Unicode decomposition attributes.
See the \l{Unicode standard} for a description of the values.
\value NoDecomposition \value Canonical \value Circle \value Compat \value Final \value Font \value Fraction \value Initial \value Isolated \value Medial \value Narrow \value NoBreak \value Small \value Square \value Sub \value Super \value Vertical \value Wide
Enumerator | |
---|---|
NoDecomposition | |
Canonical | |
Font | |
NoBreak | |
Initial | |
Medial | |
Final | |
Isolated | |
Circle | |
Super | |
Sub | |
Vertical | |
Wide | |
Narrow | |
Small | |
Square | |
Compat | |
Fraction |
enum QChar::Direction |
This enum type defines the Unicode direction attributes.
See the \l{https://www.unicode.org/reports/tr9/tr9-35.html#Table_Bidirectional_Character_Types}{Unicode Standard} for a description of the values.
In order to conform to C/C++ naming conventions "Dir" is prepended to the codes used in the Unicode Standard.
\value DirAL \value DirAN \value DirB \value DirBN \value DirCS \value DirEN \value DirES \value DirET \value [since 5.3] DirFSI \value DirL \value DirLRE \value [since 5.3] DirLRI \value DirLRO \value DirNSM \value DirON \value DirPDF \value [since 5.3] DirPDI \value DirR \value DirRLE \value [since 5.3] DirRLI \value DirRLO \value DirS \value DirWS
Enumerator | |
---|---|
DirL | |
DirR | |
DirEN | |
DirES | |
DirET | |
DirAN | |
DirCS | |
DirB | |
DirS | |
DirWS | |
DirON | |
DirLRE | |
DirLRO | |
DirAL | |
DirRLE | |
DirRLO | |
DirPDF | |
DirNSM | |
DirBN | |
DirLRI | |
DirRLI | |
DirFSI | |
DirPDI |
enum QChar::JoiningType |
since 5.3
This enum type defines the Unicode joining type attributes. See the \l{Unicode standard} for a description of the values.
In order to conform to C/C++ naming conventions "Joining_" is prepended to the codes used in the Unicode Standard.
\value Joining_None \value Joining_Causing \value Joining_Dual \value Joining_Right \value Joining_Left \value Joining_Transparent
Enumerator | |
---|---|
Joining_None | |
Joining_Causing | |
Joining_Dual | |
Joining_Right | |
Joining_Left | |
Joining_Transparent |
enum QChar::Script |
This enum type defines the Unicode script property values.
For details about the Unicode script property values see \l{https://www.unicode.org/reports/tr24/}{Unicode Standard Annex #24}.
In order to conform to C/C++ naming conventions "Script_" is prepended to the codes used in the Unicode Standard.
\value Script_Unknown For unassigned, private-use, noncharacter, and surrogate code points. \value Script_Inherited For characters that may be used with multiple scripts and that inherit their script from the preceding characters. These include nonspacing marks, enclosing marks, and zero width joiner/non-joiner characters. \value Script_Common For characters that may be used with multiple scripts and that do not inherit their script from the preceding characters.
\value [since 5.11] Script_Adlam \value [since 5.6] Script_Ahom \value [since 5.6] Script_AnatolianHieroglyphs \value Script_Arabic \value Script_Armenian \value Script_Avestan \value Script_Balinese \value Script_Bamum \value [since 5.5] Script_BassaVah \value Script_Batak \value Script_Bengali \value [since 5.11] Script_Bhaiksuki \value Script_Bopomofo \value Script_Brahmi \value Script_Braille \value Script_Buginese \value Script_Buhid \value Script_CanadianAboriginal \value Script_Carian \value [since 5.5] Script_CaucasianAlbanian \value Script_Chakma \value Script_Cham \value Script_Cherokee \value [since 5.15] Script_Chorasmian \value Script_Coptic \value Script_Cuneiform \value Script_Cypriot \value [since 6.3] Script_CyproMinoan \value Script_Cyrillic \value Script_Deseret \value Script_Devanagari \value [since 5.15] Script_DivesAkuru \value [since 5.15] Script_Dogra \value [since 5.5] Script_Duployan \value Script_EgyptianHieroglyphs \value [since 5.5] Script_Elbasan \value [since 5.15] Script_Elymaic \value Script_Ethiopic \value Script_Georgian \value Script_Glagolitic \value Script_Gothic \value [since 5.5] Script_Grantha \value Script_Greek \value Script_Gujarati \value [since 5.15] Script_GunjalaGondi \value Script_Gurmukhi \value Script_Han \value Script_Hangul \value [since 5.15] Script_HanifiRohingya \value Script_Hanunoo \value [since 5.6] Script_Hatran \value Script_Hebrew \value Script_Hiragana \value Script_ImperialAramaic \value Script_InscriptionalPahlavi \value Script_InscriptionalParthian \value Script_Javanese \value Script_Kaithi \value Script_Kannada \value Script_Katakana \value [since 6.5] Script_Kawi \value Script_KayahLi \value Script_Kharoshthi \value [since 5.15] Script_KhitanSmallScript \value Script_Khmer \value [since 5.5] Script_Khojki \value [since 5.5] Script_Khudawadi \value Script_Lao \value Script_Latin \value Script_Lepcha \value Script_Limbu \value [since 5.5] Script_LinearA \value Script_LinearB \value Script_Lisu \value Script_Lycian \value Script_Lydian \value [since 5.5] Script_Mahajani \value [since 5.15] Script_Makasar \value Script_Malayalam \value Script_Mandaic \value [since 5.5] Script_Manichaean \value [since 5.11] Script_Marchen \value [since 5.11] Script_MasaramGondi \value [since 5.15] Script_Medefaidrin \value Script_MeeteiMayek \value [since 5.5] Script_MendeKikakui \value Script_MeroiticCursive \value Script_MeroiticHieroglyphs \value Script_Miao \value [since 5.5] Script_Modi \value Script_Mongolian \value [since 5.5] Script_Mro \value [since 5.6] Script_Multani \value Script_Myanmar \value [since 5.5] Script_Nabataean \value [since 6.3] Script_NagMundari \value [since 5.15] Script_Nandinagari \value [since 5.11] Script_Newa \value Script_NewTaiLue \value Script_Nko \value [since 5.11] Script_Nushu \value [since 5.15] Script_NyiakengPuachueHmong \value Script_Ogham \value Script_OlChiki \value [since 5.6] Script_OldHungarian \value Script_OldItalic \value [since 5.5] Script_OldNorthArabian \value [since 5.5] Script_OldPermic \value Script_OldPersian \value [since 5.15] Script_OldSogdian \value Script_OldSouthArabian \value Script_OldTurkic \value [since 6.3] Script_OldUyghur \value Script_Oriya \value [since 5.11] Script_Osage \value Script_Osmanya \value [since 5.5] Script_PahawhHmong \value [since 5.5] Script_Palmyrene \value [since 5.5] Script_PauCinHau \value Script_PhagsPa \value Script_Phoenician \value [since 5.5] Script_PsalterPahlavi \value Script_Rejang \value Script_Runic \value Script_Samaritan \value Script_Saurashtra \value Script_Sharada \value Script_Shavian \value [since 5.5] Script_Siddham \value [since 5.6] Script_SignWriting \value Script_Sinhala \value [since 5.15] Script_Sogdian \value Script_SoraSompeng \value [since 5.11] Script_Soyombo \value Script_Sundanese \value Script_SylotiNagri \value Script_Syriac \value Script_Tagalog \value Script_Tagbanwa \value Script_TaiLe \value Script_TaiTham \value Script_TaiViet \value Script_Takri \value Script_Tamil \value [since 5.11] Script_Tangut \value [since 6.3] Script_Tangsa \value Script_Telugu \value Script_Thaana \value Script_Thai \value Script_Tibetan \value Script_Tifinagh \value [since 5.5] Script_Tirhuta \value [since 6.3] Script_Toto \value Script_Ugaritic \value Script_Vai \value [since 6.3] Script_Vithkuqi \value [since 5.15] Script_Wancho \value [since 5.5] Script_WarangCiti \value [since 5.15] Script_Yezidi \value Script_Yi \value [since 5.11] Script_ZanabazarSquare
\omitvalue ScriptCount
\value Null A QChar with this value isNull().
\value Tabulation Character tabulation. \value LineFeed \value FormFeed \value CarriageReturn \value Space \value Nbsp Non-breaking space. \value SoftHyphen \value ReplacementCharacter The character shown when a font has no glyph for a certain codepoint. A special question mark character is often used. Codecs use this codepoint when input data cannot be represented in Unicode. \value ObjectReplacementCharacter Used to represent an object such as an image when such objects cannot be presented. \value ByteOrderMark \value ByteOrderSwapped \value ParagraphSeparator \value LineSeparator \value [since 6.2] VisualTabCharacter Used to represent a tabulation as a horizontal arrow. \value LastValidCodePoint
Specifies which version of the \l{Unicode standard} introduced a certain character.
\value Unicode_1_1 Version 1.1 \value Unicode_2_0 Version 2.0 \value Unicode_2_1_2 Version 2.1.2 \value Unicode_3_0 Version 3.0 \value Unicode_3_1 Version 3.1 \value Unicode_3_2 Version 3.2 \value Unicode_4_0 Version 4.0 \value Unicode_4_1 Version 4.1 \value Unicode_5_0 Version 5.0 \value Unicode_5_1 Version 5.1 \value Unicode_5_2 Version 5.2 \value Unicode_6_0 Version 6.0 \value Unicode_6_1 Version 6.1 \value Unicode_6_2 Version 6.2 \value [since 5.3] Unicode_6_3 Version 6.3 \value [since 5.5] Unicode_7_0 Version 7.0 \value [since 5.6] Unicode_8_0 Version 8.0 \value [since 5.11] Unicode_9_0 Version 9.0 \value [since 5.11] Unicode_10_0 Version 10.0 \value [since 5.15] Unicode_11_0 Version 11.0 \value [since 5.15] Unicode_12_0 Version 12.0 \value [since 5.15] Unicode_12_1 Version 12.1 \value [since 5.15] Unicode_13_0 Version 13.0 \value [since 6.3] Unicode_14_0 Version 14.0 \value [since 6.5] Unicode_15_0 Version 15.0 \value Unicode_Unassigned The value is not assigned to any character in version 8.0 of Unicode.
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
Constructs a QChar corresponding to ASCII/Latin-1 character ch.
QT_NO_CAST_FROM_ASCII
is defined.
|
inlineconstexprnoexcept |
Constructs a QChar corresponding to ASCII/Latin-1 character ch.
QT_NO_CAST_FROM_ASCII
or QT_RESTRICTED_CAST_FROM_ASCII
is defined.
|
inlinenoexcept |
Returns the character's category.
Definition at line 436 of file qchar.h.
References category().
Referenced by _hb_qt_unicode_general_category(), category(), QFontMetrics::horizontalAdvance(), QQnxScreenEventHandler::injectKeyboardEvent(), isDigit(), isIdentifierPart(), isIdentifierStart(), isLower(), isTitleCase(), isUpper(), and QFontEngineMulti::stringToCMap().
|
staticnoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Returns the category of the UCS-4-encoded character specified by ucs4.
uint
argument. Definition at line 1182 of file qchar.cpp.
References QUnicodeTables::Properties::category, Other_NotAssigned, and QUnicodeTables::qGetProp().
|
inlineconstexprnoexcept |
|
inlinenoexcept |
Returns the combining class for the character as defined in the Unicode standard.
This is mainly useful as a positioning hint for marks attached to a base character.
The Qt text rendering engine uses this information to correctly position non-spacing marks around a base character.
Definition at line 439 of file qchar.h.
References combiningClass().
Referenced by _hb_qt_unicode_combining_class(), and combiningClass().
|
staticnoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Returns the combining class for the UCS-4-encoded character specified by ucs4, as defined in the Unicode standard.
uint
argument. Definition at line 1460 of file qchar.cpp.
References QUnicodeTables::Properties::combiningClass, and QUnicodeTables::qGetProp().
|
staticnoexcept |
Returns the most recent supported Unicode version.
Definition at line 1513 of file qchar.cpp.
References UNICODE_DATA_VERSION.
Referenced by qt_string_normalize().
QString QChar::decomposition | ( | ) | const |
Decomposes a character into it's constituent parts.
Returns an empty string if no decomposition exists.
Definition at line 1397 of file qchar.cpp.
References decomposition().
Referenced by _hb_qt_unicode_decompose(), and decomposition().
|
static |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Decomposes the UCS-4-encoded character specified by ucs4 into it's constituent parts.
Returns an empty string if no decomposition exists.
uint
argument. Definition at line 1409 of file qchar.cpp.
References d, decompositionHelper(), and tag.
|
inlinenoexcept |
Returns the tag defining the composition of the character.
Returns QChar::NoDecomposition if no decomposition exists.
Definition at line 445 of file qchar.h.
References decompositionTag().
Referenced by _hb_qt_unicode_decompose(), and decompositionTag().
|
staticnoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Returns the tag defining the composition of the UCS-4-encoded character specified by ucs4.
Returns QChar::NoDecomposition if no decomposition exists.
uint
argument. Definition at line 1432 of file qchar.cpp.
References Canonical, GET_DECOMPOSITION_INDEX, Hangul_SBase, Hangul_SCount, NoDecomposition, and QUnicodeTables::uc_decomposition_map.
|
inlinenoexcept |
Returns the numeric value of the digit, or -1 if the character is not a digit.
Definition at line 447 of file qchar.h.
References digitValue().
Referenced by digitValue(), QTextStreamPrivate::getNumber(), and keysymToQtKey_internal().
|
staticnoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Returns the numeric value of the digit specified by the UCS-4-encoded character, ucs4, or -1 if the character is not a digit.
uint
argument. Definition at line 1163 of file qchar.cpp.
References QUnicodeTables::Properties::digitValue, and QUnicodeTables::qGetProp().
|
inlinenoexcept |
Returns the character's direction.
Definition at line 437 of file qchar.h.
References direction().
Referenced by direction(), QStringView::isRightToLeft(), QTextBlock::textDirection(), QQuickTextInputPrivate::textDirection(), and QQuickTextEditPrivate::textDirection().
|
staticnoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Returns the direction of the UCS-4-encoded character specified by ucs4.
uint
argument. Definition at line 1201 of file qchar.cpp.
References QUnicodeTables::Properties::direction, DirL, and QUnicodeTables::qGetProp().
|
inlinestaticconstexprnoexcept |
Converts the Latin-1 character c to its equivalent QChar.
This is mainly useful for non-internationalized software.
An alternative is to use QLatin1Char.
Definition at line 461 of file qchar.h.
Referenced by QQmlJS::Dom::CommentInfo::CommentInfo(), QQmlJS::Dom::QmlFile::addComponent(), QQmlJS::Dom::QmlFile::addImport(), QV4::PropertyKey::asFunctionName(), QTextMarkdownImporter::cbEnterBlock(), QQmlJS::Dom::PathEls::Root::checkName(), QQmlJS::Dom::PathEls::Current::checkName(), QSSGRenderShaderMetadata::Uniform::conditionFromString(), QV4::FunctionObject::createBuiltinFunction(), QV4::Object::defineAccessorProperty(), QQmlTreeModelToTableModel::dump(), QQmlJS::Dom::QQmlDomAstCreator::endVisit(), QQmlJS::Dom::ErrorGroups::fatal(), QDoubleValidatorPrivate::fixupWithLocale(), QQmlJS::Dom::Path::fromString(), QSSGAssetImportManager::getAllOptions(), QSSGBufferManager::loadMeshData(), QLocalSocketPrivate::parseSockaddr(), pathFromEntry(), QHttpNetworkConnectionPrivate::prepareRequest(), QQmlJS::Dom::ModuleIndex::qmldirsToLoad(), readInputFile(), resolveImagePath(), QSSGQmlUtilities::sanitizeQmlId(), QSSGQmlUtilities::sanitizeQmlSourcePath(), QSqlRelationalTableModel::selectStatement(), QTest::sendKeyEvent(), QMessagePattern::setPattern(), QQmlJS::Dom::sinkInt(), QQmlJS::Dom::Version::stringValue(), QSSGQmlUtilities::stripParentDirectory(), QIPAddressUtils::toHex(), and QV4::SymbolCtor::virtualCall().
|
inlinestaticconstexprnoexcept |
Constructs a QChar from UTF-16 character c.
Definition at line 98 of file qchar.h.
Referenced by QUtf16::convertToUnicode(), decode(), QTextList::itemText(), QKeySequencePrivate::keyName(), and QString::vasprintf().
|
inlinestaticconstexprnoexcept |
Returns an anonymous struct that \list
{char16_t chars[2]} array, If c requires surrogates, {chars[0]} contains the high surrogate and
{chars[1]} the low surrogate, and the QStringView has size 2. Otherwise,
{chars[0]} contains c and
{chars[1]} is \l{QChar::isNull}{null}, and the QStringView has size 1.
This allows easy use of the result:
Definition at line 436 of file qstringview.h.
References begin(), highSurrogate(), lowSurrogate(), and R.
Referenced by _hb_qt_unicode_compose(), QString::assign(), canonicalOrderHelper(), composeHelper(), QUtf32::convertToUnicode(), fixedCharData(), fullConvertCase(), keyString(), mapDomainName(), and QTextHtmlParser::parseEntity().
|
inlinenoexcept |
Returns true
if the character should be reversed if the text direction is reversed; otherwise returns false
.
A bit faster equivalent of (ch.mirroredChar() != ch).
Definition at line 442 of file qchar.h.
References hasMirrored().
Referenced by hasMirrored().
|
staticnoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns true
if the UCS-4-encoded character specified by ucs4 should be reversed if the text direction is reversed; otherwise returns false
.
A bit faster equivalent of (QChar::mirroredChar(ucs4) != ucs4).
uint
argument.Definition at line 1257 of file qchar.cpp.
References QUnicodeTables::Properties::mirrorDiff, and QUnicodeTables::qGetProp().
|
inlinestaticconstexprnoexcept |
Returns the high surrogate part of a UCS-4-encoded code point.
The returned result is undefined if ucs4 is smaller than 0x10000.
uint
argument and returned ushort
. Definition at line 518 of file qchar.h.
Referenced by QUtf8BaseTraits::appendUcs4(), QUtf32::convertToUnicode(), QLocaleData::doubleToString(), encodedUtf8ToUtf16(), fromUcs4(), QCoreTextFontEngine::glyphIndex(), QKeySequencePrivate::keyName(), QV4::StringCtor::method_fromCodePoint(), qt_string_normalize(), qulltoa(), and QWindowsFontEngine::recalcAdvances().
|
inlineconstexprnoexcept |
Returns true
if the character is a decimal digit (Number_DecimalDigit); otherwise returns false
.
Definition at line 473 of file qchar.h.
References isDigit().
Referenced by digitCount(), QTextStreamPrivate::getNumber(), Driver::headerFileName(), isDigit(), isQtModule(), keysymToQtKey_internal(), QMimeGlobPattern::matchFileName(), parseInt(), trimTwoDigits(), QmlTypeRegistrar::write(), and zeroPad().
|
inlinestaticconstexprnoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns true
if the UCS-4-encoded character specified by ucs4 is a decimal digit (Number_DecimalDigit); otherwise returns false
.
uint
argument.Definition at line 573 of file qchar.h.
References category().
|
inlineconstexprnoexcept |
Returns true
if the QChar is the high part of a UTF16 surrogate (for example if its code point is in range [0xd800..0xdbff]); false otherwise.
Definition at line 479 of file qchar.h.
References isHighSurrogate().
Referenced by advanceStringIndex(), QWidgetLineControl::backspace(), canonicalOrderHelper(), QUtf8::compareUtf8(), decomposeHelper(), QTextCursor::deletePreviousChar(), QRegularExpression::escape(), foldCase(), foldCase(), QUnicodeTools::getGraphemeBreaks(), QUnicodeTools::getLineBreaks(), QUnicodeTools::getSentenceBreaks(), QUnicodeTools::getWhiteSpaces(), QUnicodeTools::getWordBreaks(), QUnicodeTools::initScripts(), isHighSurrogate(), QV4::StringPrototype::method_codePointAt(), QStringIterator::next(), QStringIterator::nextUnchecked(), normalizationQuickCheckHelper(), QStringIterator::peekPrevious(), putEscapedString(), QStringIterator::recede(), QTextBlock::textDirection(), QUtf8Functions::toUtf8(), QLocaleData::DataRange::ucsFirst(), unicodeToEncodedUtf8(), and QLocaleData::zeroUcs().
|
inlinestaticconstexprnoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns true
if the UCS-4-encoded character specified by ucs4 is the high part of a UTF16 surrogate (for example if its code point is in range [0xd800..0xdbff]); false otherwise.
uint
argument.
|
inlineconstexprnoexcept |
Returns true
if the character is a letter (Letter_* categories); otherwise returns false
.
Definition at line 470 of file qchar.h.
References isLetter().
Referenced by isLetter(), and isSignalPropertyName().
|
inlinestaticconstexprnoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns true
if the UCS-4-encoded character specified by ucs4 is a letter (Letter_* categories); otherwise returns false
.
uint
argument.
|
inlineconstexprnoexcept |
Returns true
if the character is a letter or number (Letter_* or Number_* categories); otherwise returns false
.
Definition at line 472 of file qchar.h.
References isLetterOrNumber().
Referenced by findInBlock(), isLetterOrNumber(), QDateTimeEditPrivate::isSeparatorKey(), and Recognizer::nextToken().
|
inlinestaticconstexprnoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns true
if the UCS-4-encoded character specified by ucs4 is a letter or number (Letter_* or Number_* categories); otherwise returns false
.
uint
argument.
|
inlineconstexprnoexcept |
Returns true
if the character is a lowercase letter, for example category() is Letter_Lowercase.
Definition at line 474 of file qchar.h.
References isLower().
Referenced by QmlTypesClassDescription::collect(), isLower(), and QmlIR::IRBuilder::visit().
|
inlinestaticconstexprnoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns true
if the UCS-4-encoded character specified by ucs4 is a lowercase letter, for example category() is Letter_Lowercase.
uint
argument.Definition at line 575 of file qchar.h.
References category().
|
inlineconstexprnoexcept |
Returns true
if the QChar is the low part of a UTF16 surrogate (for example if its code point is in range [0xdc00..0xdfff]); false otherwise.
Definition at line 480 of file qchar.h.
References isLowSurrogate().
Referenced by advanceStringIndex(), QWidgetLineControl::backspace(), canonicalOrderHelper(), QUtf8::compareUtf8(), QUtf32::convertFromUnicode(), decomposeHelper(), QTextCursor::deletePreviousChar(), QRegularExpressionPrivate::doMatch(), foldCase(), foldCase(), QUnicodeTools::getGraphemeBreaks(), QUnicodeTools::getLineBreaks(), QUnicodeTools::getSentenceBreaks(), QUnicodeTools::getWhiteSpaces(), QUnicodeTools::getWordBreaks(), QUnicodeTools::initScripts(), QInputControl::isAcceptableInput(), isLowSurrogate(), QV4::StringPrototype::method_codePointAt(), normalizationQuickCheckHelper(), QStringIterator::peekNext(), QStringIterator::previous(), QStringIterator::previousUnchecked(), putEscapedString(), QTextBlock::textDirection(), and QUtf8Functions::toUtf8().
|
inlinestaticconstexprnoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns true
if the UCS-4-encoded character specified by ucs4 is the low part of a UTF16 surrogate (for example if its code point is in range [0xdc00..0xdfff]); false otherwise.
uint
argument.
|
inlinenoexcept |
Returns true
if the character is a mark (Mark_* categories); otherwise returns false
.
See QChar::Category for more information regarding marks.
Definition at line 467 of file qchar.h.
References isMark().
Referenced by isMark().
|
staticnoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns true
if the UCS-4-encoded character specified by ucs4 is a mark (Mark_* categories); otherwise returns false
.
uint
argument. Definition at line 822 of file qchar.cpp.
References category(), FLAG, and QUnicodeTables::qGetProp().
|
inlineconstexprnoexcept |
Returns true
if the QChar is a non-character; false otherwise.
Unicode has a certain number of code points that are classified as "non-characters:" that is, they can be used for internal purposes in applications but cannot be used for text interchange. Those are the last two entries each Unicode Plane ([0xfffe..0xffff], [0x1fffe..0x1ffff], etc.) as well as the entries in range [0xfdd0..0xfdef].
Definition at line 478 of file qchar.h.
References isNonCharacter().
Referenced by QUtf8Functions::fromUtf8(), isNonCharacter(), and QUtf8Functions::toUtf8().
|
inlinestaticconstexprnoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns true
if the UCS-4-encoded character specified by ucs4 is a non-character; false otherwise.
Unicode has a certain number of code points that are classified as "non-characters:" that is, they can be used for internal purposes in applications but cannot be used for text interchange. Those are the last two entries each Unicode Plane ([0xfffe..0xffff], [0x1fffe..0x1ffff], etc.) as well as the entries in range [0xfdd0..0xfdef].
uint
argument.
|
inlineconstexprnoexcept |
Returns true
if the character is the Unicode character 0x0000 ('\0'); otherwise returns false
.
Definition at line 463 of file qchar.h.
Referenced by QDateTimeParser::SectionNode::format(), QSqlResultPrivate::namedToPositionalBinding(), Recognizer::nextToken(), QTextHtmlParser::parseEntity(), QSqlResultPrivate::positionalToNamedBinding(), QFileSelectorPrivate::selectionHelper(), QDirPrivate::splitFilters(), QCocoaMenuItem::sync(), QQuickTextInputPrivate::textDirection(), and QQuickTextEditPrivate::textDirection().
|
inlineconstexprnoexcept |
Returns true
if the character is a number (Number_* categories, not just 0-9); otherwise returns false
.
Definition at line 471 of file qchar.h.
References isNumber().
Referenced by isNumber(), QDateTimeEditPrivate::isSeparatorKey(), and QSSGQmlUtilities::sanitizeQmlId().
|
inlinestaticconstexprnoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns true
if the UCS-4-encoded character specified by ucs4 is a number (Number_* categories, not just 0-9); otherwise returns false
.
uint
argument.
|
inlinenoexcept |
Returns true
if the character is a printable character; otherwise returns false
.
This is any character not of category Other_*.
Note that this gives no indication of whether the character is available in a particular font.
Definition at line 465 of file qchar.h.
References isPrint().
Referenced by QtPrivate::QCalendarTextNavigator::eventFilter(), isPrint(), isPrintable(), isPrintable(), and QDoubleSpinBoxPrivate::validateAndInterpret().
|
staticnoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns true
if the UCS-4-encoded character specified by ucs4 is a printable character; otherwise returns false
. This is any character not of category Other_*.
Note that this gives no indication of whether the character is available in a particular font.
uint
argument. Definition at line 759 of file qchar.cpp.
References category(), FLAG, and QUnicodeTables::qGetProp().
|
inlinenoexcept |
|
staticnoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns true
if the UCS-4-encoded character specified by ucs4 is a punctuation mark (Punctuation_* categories); otherwise returns false
.
uint
argument. Definition at line 848 of file qchar.cpp.
References category(), FLAG, and QUnicodeTables::qGetProp().
|
inlineconstexprnoexcept |
Returns true
if the character is a separator character (Separator_* categories or certain code points from Other_Control category); otherwise returns false
.
Definition at line 466 of file qchar.h.
References isSpace().
Referenced by QQmlJS::Dom::CommentInfo::CommentInfo(), QQmlJS::Dom::AstComments::collectComments(), convertMnemonics(), QTextHtmlParser::eatSpace(), QQmlJS::Dom::LineWriter::ensureSpace(), QQmlJS::Dom::LineWriter::ensureSpace(), QUnicodeTools::getWhiteSpaces(), QQmlJS::Dom::LineWriter::handleTrailingSpace(), QTextHtmlParserNode::hasOnlyWhitespace(), idFromUrl(), isSpace(), Qt::mightBeRichText(), QTextCursorPrivate::movePosition(), QTextHtmlParser::newNode(), Recognizer::nextToken(), QTextHtmlParser::parseTag(), qt_mac_removeMnemonics(), QQC2_NAMESPACE::qt_mac_removeMnemonics(), QQmlJS::Dom::FormatPartialStatus::recalculateWithIndent(), QQmlJS::Dom::IndentingLineWriter::reindentAndSplit(), QPlatformTheme::removeMnemonics(), QQmlJS::Dom::LineWriter::setLineIndent(), QWindowsNativeFileDialogBase::setNameFilters(), QDoubleSpinBoxPrivate::validateAndInterpret(), and wrapText().
|
inlinestaticconstexprnoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns true
if the UCS-4-encoded character specified by ucs4 is a separator character (Separator_* categories or certain code points from Other_Control category); otherwise returns false
.
uint
argument.
|
inlineconstexprnoexcept |
Returns true
if the QChar contains a code point that is in either the high or the low part of the UTF-16 surrogate range (for example if its code point is in range [0xd800..0xdfff]); false otherwise.
Definition at line 481 of file qchar.h.
References isSurrogate().
Referenced by QUtf8Functions::fromUtf8(), isSurrogate(), QStringIterator::next(), QStringIterator::previous(), qt_punycodeDecoder(), QUtf8Functions::toUtf8(), QLocaleData::DataRange::ucsFirst(), and QLocaleData::zeroUcs().
|
inlinestaticconstexprnoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns true
if the UCS-4-encoded character specified by ucs4 contains a code point that is in either the high or the low part of the UTF-16 surrogate range (for example if its code point is in range [0xd800..0xdfff]); false otherwise.
uint
argument.
|
inlinenoexcept |
Returns true
if the character is a symbol (Symbol_* categories); otherwise returns false
.
Definition at line 469 of file qchar.h.
References isSymbol().
Referenced by isSymbol().
|
staticnoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns true
if the UCS-4-encoded character specified by ucs4 is a symbol (Symbol_* categories); otherwise returns false
.
uint
argument. Definition at line 878 of file qchar.cpp.
References category(), FLAG, and QUnicodeTables::qGetProp().
|
inlineconstexprnoexcept |
Returns true
if the character is a titlecase letter, for example category() is Letter_Titlecase.
Definition at line 476 of file qchar.h.
References isTitleCase().
Referenced by isTitleCase().
|
inlinestaticconstexprnoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns true
if the UCS-4-encoded character specified by ucs4 is a titlecase letter, for example category() is Letter_Titlecase.
uint
argument.Definition at line 579 of file qchar.h.
References category().
|
inlineconstexprnoexcept |
Returns true
if the character is an uppercase letter, for example category() is Letter_Uppercase.
Definition at line 475 of file qchar.h.
References isUpper().
Referenced by QmlIR::Object::appendAlias(), QmlIR::Object::appendProperty(), checkArgumentsObjectUseInSignalHandlers(), QQmlJSImportVisitor::endVisit(), QQmlJS::Dom::FormatPartialStatus::handleTokens(), QQmlPropertyPrivate::initProperty(), QSettingsPrivate::iniUnescapedKey(), QQmlJSImportVisitor::isImportPrefix(), QQmlJS::Dom::Binding::isSignalHandler(), QmlIR::IRBuilder::isSignalPropertyName(), isSignalPropertyName(), isUpper(), processUrlForClassName(), Driver::qtify(), QmlIR::IRBuilder::resolveQualifiedId(), QQmlJS::Lexer::scanDirectives(), QmlIR::IRBuilder::signalNameFromSignalPropertyName(), QV4::Heap::String::startsWithUpper(), QHashedStringRef::startsWithUpper(), QQmlConnectionsParser::verifyBindings(), QmlIR::IRBuilder::visit(), QQmlJSImportVisitor::visit(), QQmlJSImportVisitor::visit(), QmlIR::IRBuilder::visit(), QQmlJSImportVisitor::visit(), and QColorOutput::writePrefixedMessage().
|
inlinestaticconstexprnoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns true
if the UCS-4-encoded character specified by ucs4 is an uppercase letter, for example category() is Letter_Uppercase.
uint
argument.Definition at line 577 of file qchar.h.
References category().
|
inlinenoexcept |
Returns information about the joining type attributes of the character (needed for certain languages such as Arabic or Syriac).
Definition at line 438 of file qchar.h.
References joiningType().
Referenced by joiningType().
|
staticnoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns information about the joining type attributes of the UCS-4-encoded character specified by ucs4 (needed for certain languages such as Arabic or Syriac).
uint
argument. Definition at line 1226 of file qchar.cpp.
References Joining_None, and QUnicodeTables::qGetProp().
|
inlinestaticconstexprnoexcept |
Returns the low surrogate part of a UCS-4-encoded code point.
The returned result is undefined if ucs4 is smaller than 0x10000.
uint
argument and returned ushort
. Definition at line 522 of file qchar.h.
Referenced by QUtf8BaseTraits::appendUcs4(), QUtf32::convertToUnicode(), QLocaleData::doubleToString(), encodedUtf8ToUtf16(), fromUcs4(), QCoreTextFontEngine::glyphIndex(), QKeySequencePrivate::keyName(), QV4::StringCtor::method_fromCodePoint(), qt_string_normalize(), qulltoa(), and QWindowsFontEngine::recalcAdvances().
|
inlinenoexcept |
Returns the mirrored character if this character is a mirrored character; otherwise returns the character itself.
Definition at line 441 of file qchar.h.
References mirroredChar().
Referenced by _hb_qt_unicode_mirroring(), and mirroredChar().
|
staticnoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Returns the mirrored character if the UCS-4-encoded character specified by ucs4 is a mirrored character; otherwise returns the character itself.
uint
argument and returned uint
.Definition at line 1347 of file qchar.cpp.
References QUnicodeTables::Properties::mirrorDiff, and QUnicodeTables::qGetProp().
|
inlinestaticconstexprnoexcept |
Returns true
if the UCS-4-encoded character specified by ucs4 can be split into the high and low parts of a UTF16 surrogate (for example if its code point is greater than or equals to 0x10000); false otherwise.
uint
argument. Definition at line 504 of file qchar.h.
Referenced by _hb_qt_unicode_decompose(), canonicalOrderHelper(), QUtf32::convertToUnicode(), decomposeHelper(), QLocaleData::doubleToString(), encode(), encodedUtf8ToUtf16(), QUtf8Functions::fromUtf8(), QCoreTextFontEngine::glyphIndex(), QKeySequencePrivate::keyName(), ligatureHelper(), qt_string_normalize(), and QWindowsFontEngine::recalcAdvances().
|
inlineconstexprnoexcept |
|
inlinenoexcept |
Returns the Unicode script property value for this character.
Definition at line 453 of file qchar.h.
References script().
Referenced by _hb_qt_unicode_script(), QFontMetrics::inFontUcs4(), QFontMetricsF::inFontUcs4(), QWindowsDirectWriteFontDatabase::populateFamily(), and script().
|
staticnoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns the Unicode script property value for the character specified in its UCS-4-encoded form as ucs4.
uint
argument. Definition at line 1483 of file qchar.cpp.
References QUnicodeTables::qGetProp(), QUnicodeTables::Properties::script, and Script_Unknown.
|
inlinestaticconstexprnoexcept |
Converts a UTF16 surrogate pair with the given high and low values to it's UCS-4-encoded code point.
ushort
arguments and returned uint
. Definition at line 508 of file qchar.h.
Referenced by canonicalOrderHelper(), QUtf8::compareUtf8(), composeHelper(), QUtf32::convertFromUnicode(), decomposeHelper(), QLocaleData::doubleToString(), foldCase(), foldCase(), QUnicodeTools::getGraphemeBreaks(), QUnicodeTools::getLineBreaks(), QUnicodeTools::getSentenceBreaks(), QUnicodeTools::getWhiteSpaces(), QUnicodeTools::getWordBreaks(), QUnicodeTools::initScripts(), ligatureHelper(), QV4::StringPrototype::method_codePointAt(), QStringIterator::next(), QStringIterator::nextUnchecked(), normalizationQuickCheckHelper(), operator<(), operator<(), operator<(), QStringIterator::peekNext(), QStringIterator::peekNextUnchecked(), QStringIterator::peekPrevious(), QStringIterator::peekPreviousUnchecked(), QStringIterator::previous(), QStringIterator::previousUnchecked(), putEscapedString(), qulltoa(), QLocaleData::NumericData::setZero(), QTextBlock::textDirection(), QUtf8Functions::toUtf8(), QLocaleData::DataRange::ucsFirst(), QDoubleSpinBoxPrivate::validateAndInterpret(), and QLocaleData::zeroUcs().
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Converts a UTF16 surrogate pair (high, low) to it's UCS-4-encoded code point.
uint
.
|
inlinenoexcept |
Returns the case folded equivalent of the character.
For most Unicode characters this is the same as toLower().
Definition at line 451 of file qchar.h.
References toCaseFolded().
Referenced by QUtf8::compareUtf8(), QUtf8::compareUtf8(), QUtf8::compareUtf8(), QString::replace(), toCaseFolded(), and ucstricmp8().
|
staticnoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Returns the case folded equivalent of the UCS-4-encoded character specified by ucs4.
For most Unicode characters this is the same as toLower().
uint
argument and returned uint
. Definition at line 1673 of file qchar.cpp.
References QUnicodeTables::CaseFold, and convertCase_helper().
|
inlineconstexprnoexcept |
Returns the Latin-1 character equivalent to the QChar, or 0.
This is mainly useful for non-internationalized software.
Definition at line 457 of file qchar.h.
Referenced by QQmlJS::Dom::ErrorGroups::fatal(), QGeoUriProvider::getCurrentHost(), isQtModule(), maybeEscapeFirstChar(), QDateTimeParser::parseFormat(), QQuickSvgParser::parsePathDataFast(), and parsePathDataFast().
|
inlinenoexcept |
Returns the lowercase equivalent if the character is uppercase or titlecase; otherwise returns the character itself.
Definition at line 448 of file qchar.h.
References toLower().
Referenced by QPdfSearchModel::QPdfSearchModel(), findTextEntry(), QTextStreamPrivate::getNumber(), QTextStreamPrivate::getReal(), hasValidSignal(), QQmlPropertyPrivate::initProperty(), QTextHtmlParser::parseEntity(), qt_UCSConvertCase(), Driver::qtify(), runMoc(), QmlIR::IRBuilder::signalNameFromSignalPropertyName(), QCss::StyleSelector::styleRulesForNode(), QCocoaMenuItem::sync(), toLower(), and QDateTimeEditPrivate::validateAndInterpret().
|
staticnoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Returns the lowercase equivalent of the UCS-4-encoded character specified by ucs4 if the character is uppercase or titlecase; otherwise returns the character itself.
uint
argument and returned uint
. Definition at line 1581 of file qchar.cpp.
References convertCase_helper(), and QUnicodeTables::LowerCase.
|
inlinenoexcept |
Returns the title case equivalent if the character is lowercase or uppercase; otherwise returns the character itself.
Definition at line 450 of file qchar.h.
References toTitleCase().
Referenced by toTitleCase().
|
staticnoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Returns the title case equivalent of the UCS-4-encoded character specified by ucs4 if the character is lowercase or uppercase; otherwise returns the character itself.
uint
argument and returned uint
. Definition at line 1625 of file qchar.cpp.
References convertCase_helper(), and QUnicodeTables::TitleCase.
|
inlinenoexcept |
Returns the uppercase equivalent if the character is lowercase or titlecase; otherwise returns the character itself.
Definition at line 449 of file qchar.h.
References toUpper().
Referenced by CPP::WriteInitialization::acceptWidget(), QQmlPropertyCache::appendSignal(), QKeySequencePrivate::decodeString(), init_platform(), QQmlDelegateModelItemMetaType::initializeMetaObject(), QQmlDelegateModelItemMetaType::initializePrototype(), QKeySequencePrivate::keyName(), QKeySequence::mnemonic(), QQmlProperty::name(), qt_UCSConvertCase(), qtKey(), toKeyOrUnicode(), toUpper(), and tryDriveUNCFallback().
|
staticnoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Returns the uppercase equivalent of the UCS-4-encoded character specified by ucs4 if the character is lowercase or titlecase; otherwise returns the character itself.
uint
argument and returned uint
. Definition at line 1603 of file qchar.cpp.
References convertCase_helper(), and QUnicodeTables::UpperCase.
|
inlineconstexprnoexcept |
Returns the numeric Unicode value of the QChar.
Definition at line 458 of file qchar.h.
Referenced by QQmlJS::Dom::CommentInfo::CommentInfo(), addHexDigit(), QUrlPrivate::appendHost(), appendReplacementString(), QQuickTextInputPrivate::backspace(), convertHex(), QKeySequencePrivate::decodeString(), QPdfEnginePrivate::drawTextItem(), QTextEngine::elidedText(), encodeText(), findArgEscapes(), fontSizeSpec(), QTextStreamPrivate::getNumber(), QSettingsPrivate::iniUnescapedKey(), QFileSystemEntry::isAbsolute(), QXmlUtils::isEncName(), QmlIR::IRBuilder::isSignalPropertyName(), isSpecialKey(), macToQtFormat(), mangledIdentifier(), QV4::StringPrototype::method_charCodeAt(), QV4::StringPrototype::method_trim(), minimalPattern(), QTextLineItemIterator::next(), QStringIterator::next(), Recognizer::nextToken(), QStringIterator::nextUnchecked(), operator<<(), operator>>(), parseInt(), QQuickSvgParser::parsePathDataFast(), parsePathDataFast(), QStringIterator::previous(), QStringIterator::previousUnchecked(), qt_localizedName(), qt_punycodeDecoder(), QUrlQuery::query(), QUrlQueryPrivate::recodeFromUser(), QUrlQueryPrivate::recodeToUser(), QString::replace(), replaceArgEscapes(), QString::resize(), resolveColor(), QQmlJS::Lexer::scanRegExp(), QUrlPrivate::setAuthority(), QUrlQueryPrivate::setQuery(), QUrlPrivate::setScheme(), QTextBoundaryFinder::string(), QCommonStyle::styleHint(), QQC2::QCommonStyle::styleHint(), QRawFont::supportsCharacter(), QCocoaMenuItem::sync(), toInt(), toKeyOrUnicode(), QTextDocument::toPlainText(), tryDriveUNCFallback(), QTextOdfWriter::writeBlock(), xpmHash(), and QLocaleData::zeroUcs().
|
inlineconstexprnoexcept |
|
inlinenoexcept |
Returns the Unicode version that introduced this character.
Definition at line 455 of file qchar.h.
References unicodeVersion().
Referenced by decomposeHelper(), and unicodeVersion().
|
staticnoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Returns the Unicode version that introduced the character specified in its UCS-4-encoded form as ucs4.
uint
argument. Definition at line 1503 of file qchar.cpp.
References QUnicodeTables::qGetProp(), Unicode_Unassigned, and QUnicodeTables::Properties::unicodeVersion.
|
friend |
|
friend |
|
friend |
|
related |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
related |