Struct qt_core::QChar

source ·
#[repr(C)]
pub struct QChar { /* private fields */ }
Expand description

The QChar class provides a 16-bit Unicode character.

C++ class: QChar.

C++ documentation:

The QChar class provides a 16-bit Unicode character.

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 chars. 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.

For more information see "About the Unicode Character Database".

Implementations§

source§

impl QChar

source

pub unsafe fn category_0a(&self) -> Category

Returns the character's category.

Calls C++ function: QChar::Category QChar::category() const.

C++ documentation:

Returns the character’s category.

source

pub unsafe fn category_1a(ucs4: c_uint) -> Category

This is an overloaded function.

Calls C++ function: static QChar::Category QChar::category(unsigned int ucs4).

C++ documentation:

This is an overloaded function.

Returns the category of the UCS-4-encoded character specified by ucs4.

source

pub unsafe fn cell(&self) -> c_uchar

Returns the cell (least significant byte) of the Unicode character.

Calls C++ function: unsigned char QChar::cell() const.

C++ documentation:

Returns the cell (least significant byte) of the Unicode character.

See also row().

source

pub unsafe fn combining_class_0a(&self) -> c_uchar

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.

Calls C++ function: unsigned char QChar::combiningClass() const.

C++ documentation:

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.

source

pub unsafe fn combining_class_1a(ucs4: c_uint) -> c_uchar

This is an overloaded function.

Calls C++ function: static unsigned char QChar::combiningClass(unsigned int ucs4).

C++ documentation:

This is an overloaded function.

Returns the combining class for the UCS-4-encoded character specified by ucs4, as defined in the Unicode standard.

source

pub unsafe fn copy_from(&self, other: impl CastInto<Ref<QChar>>) -> Ref<QChar>

The QChar class provides a 16-bit Unicode character.

Calls C++ function: QChar& QChar::operator=(const QChar& other).

C++ documentation:

The QChar class provides a 16-bit Unicode character.

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 chars. 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.

For more information see "About the Unicode Character Database".

source

pub unsafe fn current_unicode_version() -> UnicodeVersion

Returns the most recent supported Unicode version.

Calls C++ function: static QChar::UnicodeVersion QChar::currentUnicodeVersion().

C++ documentation:

Returns the most recent supported Unicode version.

source

pub unsafe fn decomposition_0a(&self) -> CppBox<QString>

Decomposes a character into it's constituent parts. Returns an empty string if no decomposition exists.

Calls C++ function: QString QChar::decomposition() const.

C++ documentation:

Decomposes a character into it’s constituent parts. Returns an empty string if no decomposition exists.

source

pub unsafe fn decomposition_1a(ucs4: c_uint) -> CppBox<QString>

This is an overloaded function.

Calls C++ function: static QString QChar::decomposition(unsigned int ucs4).

C++ documentation:

This is an overloaded function.

Decomposes the UCS-4-encoded character specified by ucs4 into it's constituent parts. Returns an empty string if no decomposition exists.

source

pub unsafe fn decomposition_tag_0a(&self) -> Decomposition

Returns the tag defining the composition of the character. Returns QChar::NoDecomposition if no decomposition exists.

Calls C++ function: QChar::Decomposition QChar::decompositionTag() const.

C++ documentation:

Returns the tag defining the composition of the character. Returns QChar::NoDecomposition if no decomposition exists.

source

pub unsafe fn decomposition_tag_1a(ucs4: c_uint) -> Decomposition

This is an overloaded function.

Calls C++ function: static QChar::Decomposition QChar::decompositionTag(unsigned int ucs4).

C++ documentation:

This is an overloaded function.

Returns the tag defining the composition of the UCS-4-encoded character specified by ucs4. Returns QChar::NoDecomposition if no decomposition exists.

source

pub unsafe fn digit_value_0a(&self) -> c_int

Returns the numeric value of the digit, or -1 if the character is not a digit.

Calls C++ function: int QChar::digitValue() const.

C++ documentation:

Returns the numeric value of the digit, or -1 if the character is not a digit.

source

pub unsafe fn digit_value_1a(ucs4: c_uint) -> c_int

This is an overloaded function.

Calls C++ function: static int QChar::digitValue(unsigned int ucs4).

C++ documentation:

This is an overloaded function.

Returns the numeric value of the digit specified by the UCS-4-encoded character, ucs4, or -1 if the character is not a digit.

source

pub unsafe fn direction_0a(&self) -> Direction

Returns the character's direction.

Calls C++ function: QChar::Direction QChar::direction() const.

C++ documentation:

Returns the character’s direction.

source

pub unsafe fn direction_1a(ucs4: c_uint) -> Direction

This is an overloaded function.

Calls C++ function: static QChar::Direction QChar::direction(unsigned int ucs4).

C++ documentation:

This is an overloaded function.

Returns the direction of the UCS-4-encoded character specified by ucs4.

source

pub unsafe fn from_latin1(c: c_char) -> CppBox<QChar>

Converts the Latin-1 character c to its equivalent QChar. This is mainly useful for non-internationalized software.

Calls C++ function: static QChar QChar::fromLatin1(char c).

C++ documentation:

Converts the Latin-1 character c to its equivalent QChar. This is mainly useful for non-internationalized software.

An alternative is to use QLatin1Char.

See also toLatin1() and unicode().

source

pub unsafe fn has_mirrored_0a(&self) -> bool

Returns true if the character should be reversed if the text direction is reversed; otherwise returns false.

Calls C++ function: bool QChar::hasMirrored() const.

C++ documentation:

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).

See also mirroredChar().

source

pub unsafe fn has_mirrored_1a(ucs4: c_uint) -> bool

This is an overloaded function.

Calls C++ function: static bool QChar::hasMirrored(unsigned int ucs4).

C++ documentation:

This is an overloaded function.

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).

This function was introduced in Qt 5.0.

See also mirroredChar().

source

pub unsafe fn high_surrogate(ucs4: c_uint) -> c_ushort

Returns the high surrogate part of a UCS-4-encoded code point. The returned result is undefined if ucs4 is smaller than 0x10000.

Calls C++ function: static unsigned short QChar::highSurrogate(unsigned int ucs4).

C++ documentation:

Returns the high surrogate part of a UCS-4-encoded code point. The returned result is undefined if ucs4 is smaller than 0x10000.

source

pub unsafe fn is_digit_0a(&self) -> bool

Returns true if the character is a decimal digit (Number_DecimalDigit); otherwise returns false.

Calls C++ function: bool QChar::isDigit() const.

C++ documentation:

Returns true if the character is a decimal digit (Number_DecimalDigit); otherwise returns false.

See also isNumber().

source

pub unsafe fn is_digit_1a(ucs4: c_uint) -> bool

This is an overloaded function.

Calls C++ function: static bool QChar::isDigit(unsigned int ucs4).

C++ documentation:

This is an overloaded function.

Returns true if the UCS-4-encoded character specified by ucs4 is a decimal digit (Number_DecimalDigit); otherwise returns false.

This function was introduced in Qt 5.0.

See also isNumber().

source

pub unsafe fn is_high_surrogate_0a(&self) -> bool

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.

Calls C++ function: bool QChar::isHighSurrogate() const.

C++ documentation:

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.

source

pub unsafe fn is_high_surrogate_1a(ucs4: c_uint) -> bool

This is an overloaded function.

Calls C++ function: static bool QChar::isHighSurrogate(unsigned int ucs4).

C++ documentation:

This is an overloaded function.

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.

source

pub unsafe fn is_letter_0a(&self) -> bool

Returns true if the character is a letter (Letter_* categories); otherwise returns false.

Calls C++ function: bool QChar::isLetter() const.

C++ documentation:

Returns true if the character is a letter (Letter_* categories); otherwise returns false.

source

pub unsafe fn is_letter_1a(ucs4: c_uint) -> bool

This is an overloaded function.

Calls C++ function: static bool QChar::isLetter(unsigned int ucs4).

C++ documentation:

This is an overloaded function.

Returns true if the UCS-4-encoded character specified by ucs4 is a letter (Letter_* categories); otherwise returns false.

This function was introduced in Qt 5.0.

source

pub unsafe fn is_letter_or_number_0a(&self) -> bool

Returns true if the character is a letter or number (Letter_* or Number_* categories); otherwise returns false.

Calls C++ function: bool QChar::isLetterOrNumber() const.

C++ documentation:

Returns true if the character is a letter or number (Letter_* or Number_* categories); otherwise returns false.

source

pub unsafe fn is_letter_or_number_1a(ucs4: c_uint) -> bool

This is an overloaded function.

Calls C++ function: static bool QChar::isLetterOrNumber(unsigned int ucs4).

C++ documentation:

This is an overloaded function.

Returns true if the UCS-4-encoded character specified by ucs4 is a letter or number (Letter_* or Number_* categories); otherwise returns false.

This function was introduced in Qt 5.0.

source

pub unsafe fn is_low_surrogate_0a(&self) -> bool

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.

Calls C++ function: bool QChar::isLowSurrogate() const.

C++ documentation:

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.

source

pub unsafe fn is_low_surrogate_1a(ucs4: c_uint) -> bool

This is an overloaded function.

Calls C++ function: static bool QChar::isLowSurrogate(unsigned int ucs4).

C++ documentation:

This is an overloaded function.

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.

source

pub unsafe fn is_lower_0a(&self) -> bool

Returns true if the character is a lowercase letter, for example category() is Letter_Lowercase.

Calls C++ function: bool QChar::isLower() const.

C++ documentation:

Returns true if the character is a lowercase letter, for example category() is Letter_Lowercase.

See also isUpper(), toLower(), and toUpper().

source

pub unsafe fn is_lower_1a(ucs4: c_uint) -> bool

This is an overloaded function.

Calls C++ function: static bool QChar::isLower(unsigned int ucs4).

C++ documentation:

This is an overloaded function.

Returns true if the UCS-4-encoded character specified by ucs4 is a lowercase letter, for example category() is Letter_Lowercase.

This function was introduced in Qt 5.0.

See also isUpper(), toLower(), and toUpper().

source

pub unsafe fn is_mark_0a(&self) -> bool

Returns true if the character is a mark (Mark_* categories); otherwise returns false.

Calls C++ function: bool QChar::isMark() const.

C++ documentation:

Returns true if the character is a mark (Mark_* categories); otherwise returns false.

See QChar::Category for more information regarding marks.

source

pub unsafe fn is_mark_1a(ucs4: c_uint) -> bool

This is an overloaded function.

Calls C++ function: static bool QChar::isMark(unsigned int ucs4).

C++ documentation:

This is an overloaded function.

Returns true if the UCS-4-encoded character specified by ucs4 is a mark (Mark_* categories); otherwise returns false.

This function was introduced in Qt 5.0.

source

pub unsafe fn is_non_character_0a(&self) -> bool

Returns true if the QChar is a non-character; false otherwise.

Calls C++ function: bool QChar::isNonCharacter() const.

C++ documentation:

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].

This function was introduced in Qt 5.0.

source

pub unsafe fn is_non_character_1a(ucs4: c_uint) -> bool

This is an overloaded function.

Calls C++ function: static bool QChar::isNonCharacter(unsigned int ucs4).

C++ documentation:

This is an overloaded function.

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].

This function was introduced in Qt 5.0.

source

pub unsafe fn is_null(&self) -> bool

Returns true if the character is the Unicode character 0x0000 ('\0'); otherwise returns false.

Calls C++ function: bool QChar::isNull() const.

C++ documentation:

Returns true if the character is the Unicode character 0x0000 (‘\0’); otherwise returns false.

source

pub unsafe fn is_number_0a(&self) -> bool

Returns true if the character is a number (Number_* categories, not just 0-9); otherwise returns false.

Calls C++ function: bool QChar::isNumber() const.

C++ documentation:

Returns true if the character is a number (Number_* categories, not just 0-9); otherwise returns false.

See also isDigit().

source

pub unsafe fn is_number_1a(ucs4: c_uint) -> bool

This is an overloaded function.

Calls C++ function: static bool QChar::isNumber(unsigned int ucs4).

C++ documentation:

This is an overloaded function.

Returns true if the UCS-4-encoded character specified by ucs4 is a number (Number_* categories, not just 0-9); otherwise returns false.

This function was introduced in Qt 5.0.

See also isDigit().

source

pub unsafe fn is_print_0a(&self) -> bool

Returns true if the character is a printable character; otherwise returns false. This is any character not of category Other_*.

Calls C++ function: bool QChar::isPrint() const.

C++ documentation:

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.

source

pub unsafe fn is_print_1a(ucs4: c_uint) -> bool

This is an overloaded function.

Calls C++ function: static bool QChar::isPrint(unsigned int ucs4).

C++ documentation:

This is an overloaded function.

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.

This function was introduced in Qt 5.0.

source

pub unsafe fn is_punct_0a(&self) -> bool

Returns true if the character is a punctuation mark (Punctuation_* categories); otherwise returns false.

Calls C++ function: bool QChar::isPunct() const.

C++ documentation:

Returns true if the character is a punctuation mark (Punctuation_* categories); otherwise returns false.

source

pub unsafe fn is_punct_1a(ucs4: c_uint) -> bool

This is an overloaded function.

Calls C++ function: static bool QChar::isPunct(unsigned int ucs4).

C++ documentation:

This is an overloaded function.

Returns true if the UCS-4-encoded character specified by ucs4 is a punctuation mark (Punctuation_* categories); otherwise returns false.

This function was introduced in Qt 5.0.

source

pub unsafe fn is_space_0a(&self) -> bool

Returns true if the character is a separator character (Separator_* categories or certain code points from Other_Control category); otherwise returns false.

Calls C++ function: bool QChar::isSpace() const.

C++ documentation:

Returns true if the character is a separator character (Separator_* categories or certain code points from Other_Control category); otherwise returns false.

source

pub unsafe fn is_space_1a(ucs4: c_uint) -> bool

This is an overloaded function.

Calls C++ function: static bool QChar::isSpace(unsigned int ucs4).

C++ documentation:

This is an overloaded function.

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.

This function was introduced in Qt 5.0.

source

pub unsafe fn is_surrogate_0a(&self) -> bool

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.

Calls C++ function: bool QChar::isSurrogate() const.

C++ documentation:

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.

This function was introduced in Qt 5.0.

source

pub unsafe fn is_surrogate_1a(ucs4: c_uint) -> bool

This is an overloaded function.

Calls C++ function: static bool QChar::isSurrogate(unsigned int ucs4).

C++ documentation:

This is an overloaded function.

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.

This function was introduced in Qt 5.0.

source

pub unsafe fn is_symbol_0a(&self) -> bool

Returns true if the character is a symbol (Symbol_* categories); otherwise returns false.

Calls C++ function: bool QChar::isSymbol() const.

C++ documentation:

Returns true if the character is a symbol (Symbol_* categories); otherwise returns false.

source

pub unsafe fn is_symbol_1a(ucs4: c_uint) -> bool

This is an overloaded function.

Calls C++ function: static bool QChar::isSymbol(unsigned int ucs4).

C++ documentation:

This is an overloaded function.

Returns true if the UCS-4-encoded character specified by ucs4 is a symbol (Symbol_* categories); otherwise returns false.

This function was introduced in Qt 5.0.

source

pub unsafe fn is_title_case_0a(&self) -> bool

Returns true if the character is a titlecase letter, for example category() is Letter_Titlecase.

Calls C++ function: bool QChar::isTitleCase() const.

C++ documentation:

Returns true if the character is a titlecase letter, for example category() is Letter_Titlecase.

See also isLower(), toUpper(), toLower(), and toTitleCase().

source

pub unsafe fn is_title_case_1a(ucs4: c_uint) -> bool

This is an overloaded function.

Calls C++ function: static bool QChar::isTitleCase(unsigned int ucs4).

C++ documentation:

This is an overloaded function.

Returns true if the UCS-4-encoded character specified by ucs4 is a titlecase letter, for example category() is Letter_Titlecase.

This function was introduced in Qt 5.0.

See also isLower(), toUpper(), toLower(), and toTitleCase().

source

pub unsafe fn is_upper_0a(&self) -> bool

Returns true if the character is an uppercase letter, for example category() is Letter_Uppercase.

Calls C++ function: bool QChar::isUpper() const.

C++ documentation:

Returns true if the character is an uppercase letter, for example category() is Letter_Uppercase.

See also isLower(), toUpper(), and toLower().

source

pub unsafe fn is_upper_1a(ucs4: c_uint) -> bool

This is an overloaded function.

Calls C++ function: static bool QChar::isUpper(unsigned int ucs4).

C++ documentation:

This is an overloaded function.

Returns true if the UCS-4-encoded character specified by ucs4 is an uppercase letter, for example category() is Letter_Uppercase.

This function was introduced in Qt 5.0.

See also isLower(), toUpper(), and toLower().

source

pub unsafe fn joining_0a(&self) -> Joining

Returns information about the joining properties of the character (needed for certain languages such as Arabic).

Calls C++ function: QChar::Joining QChar::joining() const.

C++ documentation:

Returns information about the joining properties of the character (needed for certain languages such as Arabic).

source

pub unsafe fn joining_1a(ucs4: c_uint) -> Joining

This is an overloaded function.

Calls C++ function: static QChar::Joining QChar::joining(unsigned int ucs4).

C++ documentation:

This is an overloaded function.

Returns information about the joining properties of the UCS-4-encoded character specified by ucs4 (needed for certain languages such as Arabic).

source

pub unsafe fn joining_type_0a(&self) -> JoiningType

Returns information about the joining type attributes of the character (needed for certain languages such as Arabic or Syriac).

Calls C++ function: QChar::JoiningType QChar::joiningType() const.

C++ documentation:

Returns information about the joining type attributes of the character (needed for certain languages such as Arabic or Syriac).

This function was introduced in Qt 5.3.

source

pub unsafe fn joining_type_1a(ucs4: c_uint) -> JoiningType

This is an overloaded function.

Calls C++ function: static QChar::JoiningType QChar::joiningType(unsigned int ucs4).

C++ documentation:

This is an overloaded function.

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).

This function was introduced in Qt 5.3.

source

pub unsafe fn low_surrogate(ucs4: c_uint) -> c_ushort

Returns the low surrogate part of a UCS-4-encoded code point. The returned result is undefined if ucs4 is smaller than 0x10000.

Calls C++ function: static unsigned short QChar::lowSurrogate(unsigned int ucs4).

C++ documentation:

Returns the low surrogate part of a UCS-4-encoded code point. The returned result is undefined if ucs4 is smaller than 0x10000.

source

pub unsafe fn mirrored_char_0a(&self) -> CppBox<QChar>

Returns the mirrored character if this character is a mirrored character; otherwise returns the character itself.

Calls C++ function: QChar QChar::mirroredChar() const.

C++ documentation:

Returns the mirrored character if this character is a mirrored character; otherwise returns the character itself.

See also hasMirrored().

source

pub unsafe fn mirrored_char_1a(ucs4: c_uint) -> c_uint

This is an overloaded function.

Calls C++ function: static unsigned int QChar::mirroredChar(unsigned int ucs4).

C++ documentation:

This is an overloaded function.

Returns the mirrored character if the UCS-4-encoded character specified by ucs4 is a mirrored character; otherwise returns the character itself.

See also hasMirrored().

source

pub unsafe fn new() -> CppBox<QChar>

Constructs a null QChar ('\0').

Calls C++ function: [constructor] void QChar::QChar().

C++ documentation:

Constructs a null QChar (‘\0’).

See also isNull().

source

pub unsafe fn from_ushort(rc: c_ushort) -> CppBox<QChar>

Calls C++ function: [constructor] void QChar::QChar(unsigned short rc).

source

pub unsafe fn from_2_uchar(c: c_uchar, r: c_uchar) -> CppBox<QChar>

Calls C++ function: [constructor] void QChar::QChar(unsigned char c, unsigned char r).

source

pub unsafe fn from_short(rc: c_short) -> CppBox<QChar>

Constructs a QChar for the character with Unicode code point code.

Calls C++ function: [constructor] void QChar::QChar(short rc).

C++ documentation:

Constructs a QChar for the character with Unicode code point code.

source

pub unsafe fn from_uint(rc: c_uint) -> CppBox<QChar>

Calls C++ function: [constructor] void QChar::QChar(unsigned int rc).

source

pub unsafe fn from_int(rc: c_int) -> CppBox<QChar>

Constructs a QChar for the character with Unicode code point code.

Calls C++ function: [constructor] void QChar::QChar(int rc).

C++ documentation:

Constructs a QChar for the character with Unicode code point code.

source

pub unsafe fn from_special_character(s: SpecialCharacter) -> CppBox<QChar>

Constructs a QChar for the predefined character value ch.

Calls C++ function: [constructor] void QChar::QChar(QChar::SpecialCharacter s).

C++ documentation:

Constructs a QChar for the predefined character value ch.

source

pub unsafe fn from_q_latin1_char( ch: impl CastInto<Ref<QLatin1Char>> ) -> CppBox<QChar>

Constructs a QChar corresponding to ASCII/Latin-1 character ch.

Calls C++ function: [constructor] void QChar::QChar(QLatin1Char ch).

C++ documentation:

Constructs a QChar corresponding to ASCII/Latin-1 character ch.

source

pub unsafe fn from_char(c: c_char) -> CppBox<QChar>

Constructs a QChar corresponding to ASCII/Latin-1 character ch.

Calls C++ function: [constructor] void QChar::QChar(char c).

C++ documentation:

Constructs a QChar corresponding to ASCII/Latin-1 character ch.

Note: This constructor is not available when QT_NO_CAST_FROM_ASCII is defined.

See also QT_NO_CAST_FROM_ASCII.

source

pub unsafe fn from_uchar(c: c_uchar) -> CppBox<QChar>

Calls C++ function: [constructor] void QChar::QChar(unsigned char c).

source

pub unsafe fn from_char16_t(ch: char16_t) -> CppBox<QChar>

Constructs a QChar corresponding to the UTF-16 character ch.

Calls C++ function: [constructor] void QChar::QChar(char16_t ch).

C++ documentation:

Constructs a QChar corresponding to the UTF-16 character ch.

This function was introduced in Qt 5.10.

source

pub unsafe fn new_copy(other: impl CastInto<Ref<QChar>>) -> CppBox<QChar>

The QChar class provides a 16-bit Unicode character.

Calls C++ function: [constructor] void QChar::QChar(const QChar& other).

C++ documentation:

The QChar class provides a 16-bit Unicode character.

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 chars. 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.

For more information see "About the Unicode Character Database".

source

pub unsafe fn requires_surrogates(ucs4: c_uint) -> bool

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.

Calls C++ function: static bool QChar::requiresSurrogates(unsigned int ucs4).

C++ documentation:

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.

source

pub unsafe fn row(&self) -> c_uchar

Returns the row (most significant byte) of the Unicode character.

Calls C++ function: unsigned char QChar::row() const.

C++ documentation:

Returns the row (most significant byte) of the Unicode character.

See also cell().

source

pub unsafe fn script_0a(&self) -> Script

Returns the Unicode script property value for this character.

Calls C++ function: QChar::Script QChar::script() const.

C++ documentation:

Returns the Unicode script property value for this character.

This function was introduced in Qt 5.1.

source

pub unsafe fn script_1a(ucs4: c_uint) -> Script

This is an overloaded function.

Calls C++ function: static QChar::Script QChar::script(unsigned int ucs4).

C++ documentation:

This is an overloaded function.

Returns the Unicode script property value for the character specified in its UCS-4-encoded form as ucs4.

This function was introduced in Qt 5.1.

source

pub unsafe fn set_cell(&self, acell: c_uchar)

Calls C++ function: void QChar::setCell(unsigned char acell).

source

pub unsafe fn set_row(&self, arow: c_uchar)

Calls C++ function: void QChar::setRow(unsigned char arow).

source

pub unsafe fn surrogate_to_ucs4_2_ushort( high: c_ushort, low: c_ushort ) -> c_uint

Converts a UTF16 surrogate pair with the given high and low values to it's UCS-4-encoded code point.

Calls C++ function: static unsigned int QChar::surrogateToUcs4(unsigned short high, unsigned short low).

C++ documentation:

Converts a UTF16 surrogate pair with the given high and low values to it’s UCS-4-encoded code point.

source

pub unsafe fn surrogate_to_ucs4_2_q_char( high: impl CastInto<Ref<QChar>>, low: impl CastInto<Ref<QChar>> ) -> c_uint

This is an overloaded function.

Calls C++ function: static unsigned int QChar::surrogateToUcs4(QChar high, QChar low).

C++ documentation:

This is an overloaded function.

Converts a UTF16 surrogate pair (high, low) to it's UCS-4-encoded code point.

source

pub unsafe fn to_case_folded_0a(&self) -> CppBox<QChar>

Returns the case folded equivalent of the character. For most Unicode characters this is the same as toLower().

Calls C++ function: QChar QChar::toCaseFolded() const.

C++ documentation:

Returns the case folded equivalent of the character. For most Unicode characters this is the same as toLower().

source

pub unsafe fn to_case_folded_1a(ucs4: c_uint) -> c_uint

This is an overloaded function.

Calls C++ function: static unsigned int QChar::toCaseFolded(unsigned int ucs4).

C++ documentation:

This is an overloaded function.

Returns the case folded equivalent of the UCS-4-encoded character specified by ucs4. For most Unicode characters this is the same as toLower().

source

pub unsafe fn to_latin1(&self) -> c_char

Returns the Latin-1 character equivalent to the QChar, or 0. This is mainly useful for non-internationalized software.

Calls C++ function: char QChar::toLatin1() const.

C++ documentation:

Returns the Latin-1 character equivalent to the QChar, or 0. This is mainly useful for non-internationalized software.

Note: It is not possible to distinguish a non-Latin-1 character from a Latin-1 0 (NUL) character. Prefer to use unicode(), which does not have this ambiguity.

See also unicode().

source

pub unsafe fn to_lower_0a(&self) -> CppBox<QChar>

Returns the lowercase equivalent if the character is uppercase or titlecase; otherwise returns the character itself.

Calls C++ function: QChar QChar::toLower() const.

C++ documentation:

Returns the lowercase equivalent if the character is uppercase or titlecase; otherwise returns the character itself.

source

pub unsafe fn to_lower_1a(ucs4: c_uint) -> c_uint

This is an overloaded function.

Calls C++ function: static unsigned int QChar::toLower(unsigned int ucs4).

C++ documentation:

This is an overloaded function.

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.

source

pub unsafe fn to_title_case_0a(&self) -> CppBox<QChar>

Returns the title case equivalent if the character is lowercase or uppercase; otherwise returns the character itself.

Calls C++ function: QChar QChar::toTitleCase() const.

C++ documentation:

Returns the title case equivalent if the character is lowercase or uppercase; otherwise returns the character itself.

source

pub unsafe fn to_title_case_1a(ucs4: c_uint) -> c_uint

This is an overloaded function.

Calls C++ function: static unsigned int QChar::toTitleCase(unsigned int ucs4).

C++ documentation:

This is an overloaded function.

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.

source

pub unsafe fn to_upper_0a(&self) -> CppBox<QChar>

Returns the uppercase equivalent if the character is lowercase or titlecase; otherwise returns the character itself.

Calls C++ function: QChar QChar::toUpper() const.

C++ documentation:

Returns the uppercase equivalent if the character is lowercase or titlecase; otherwise returns the character itself.

source

pub unsafe fn to_upper_1a(ucs4: c_uint) -> c_uint

This is an overloaded function.

Calls C++ function: static unsigned int QChar::toUpper(unsigned int ucs4).

C++ documentation:

This is an overloaded function.

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.

source

pub unsafe fn unicode(&self) -> c_ushort

Returns the numeric Unicode value of the QChar.

Calls C++ function: unsigned short QChar::unicode() const.

C++ documentation:

Returns the numeric Unicode value of the QChar.

source

pub unsafe fn unicode_mut(&self) -> *mut c_ushort

Returns a reference to the numeric Unicode value of the QChar.

Calls C++ function: unsigned short& QChar::unicode().

C++ documentation:

Returns a reference to the numeric Unicode value of the QChar.

source

pub unsafe fn unicode_version_0a(&self) -> UnicodeVersion

Returns the Unicode version that introduced this character.

Calls C++ function: QChar::UnicodeVersion QChar::unicodeVersion() const.

C++ documentation:

Returns the Unicode version that introduced this character.

source

pub unsafe fn unicode_version_1a(ucs4: c_uint) -> UnicodeVersion

This is an overloaded function.

Calls C++ function: static QChar::UnicodeVersion QChar::unicodeVersion(unsigned int ucs4).

C++ documentation:

This is an overloaded function.

Returns the Unicode version that introduced the character specified in its UCS-4-encoded form as ucs4.

Trait Implementations§

source§

impl Add<Ref<QString>> for &QChar

source§

fn add(self, s2: Ref<QString>) -> CppBox<QString>

Calls C++ function: QString operator+(QChar s1, const QString& s2).

§

type Output = CppBox<QString>

The resulting type after applying the + operator.
source§

impl Add<Ref<QStringRef>> for &QChar

source§

fn add(self, s2: Ref<QStringRef>) -> CppBox<QString>

Calls C++ function: QString operator+(QChar s1, const QStringRef& s2).

§

type Output = CppBox<QString>

The resulting type after applying the + operator.
source§

impl CppDeletable for QChar

source§

unsafe fn delete(&self)

The QChar class provides a 16-bit Unicode character.

Calls C++ function: [destructor] void QChar::~QChar().

C++ documentation:

The QChar class provides a 16-bit Unicode character.

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 chars. 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.

For more information see "About the Unicode Character Database".

source§

impl Ge<Ref<QChar>> for QChar

source§

unsafe fn ge(&self, c2: &Ref<QChar>) -> bool

Returns true if the numeric Unicode value of c1 is greater than or equal to that of c2; otherwise returns false.

Calls C++ function: bool operator>=(QChar c1, QChar c2).

C++ documentation:

Returns true if the numeric Unicode value of c1 is greater than or equal to that of c2; otherwise returns false.

source§

impl Ge<Ref<QLatin1String>> for QChar

source§

unsafe fn ge(&self, rhs: &Ref<QLatin1String>) -> bool

Returns true if the numeric Unicode value of c1 is greater than or equal to that of c2; otherwise returns false.

Calls C++ function: bool operator>=(QChar lhs, QLatin1String rhs).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for bool operator>=(QChar c1, QChar c2):

Returns true if the numeric Unicode value of c1 is greater than or equal to that of c2; otherwise returns false.

source§

impl Ge<Ref<QString>> for QChar

source§

unsafe fn ge(&self, rhs: &Ref<QString>) -> bool

Returns true if the numeric Unicode value of c1 is greater than or equal to that of c2; otherwise returns false.

Calls C++ function: bool operator>=(QChar lhs, const QString& rhs).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for bool operator>=(QChar c1, QChar c2):

Returns true if the numeric Unicode value of c1 is greater than or equal to that of c2; otherwise returns false.

source§

impl Ge<Ref<QStringRef>> for QChar

source§

unsafe fn ge(&self, rhs: &Ref<QStringRef>) -> bool

Returns true if the numeric Unicode value of c1 is greater than or equal to that of c2; otherwise returns false.

Calls C++ function: bool operator>=(QChar lhs, const QStringRef& rhs).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for bool operator>=(QChar c1, QChar c2):

Returns true if the numeric Unicode value of c1 is greater than or equal to that of c2; otherwise returns false.

source§

impl Ge<Ref<QStringView>> for QChar

Available on cpp_lib_version="5.11.3" or cpp_lib_version="5.12.2" or cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.
source§

unsafe fn ge(&self, rhs: &Ref<QStringView>) -> bool

Returns true if the numeric Unicode value of c1 is greater than or equal to that of c2; otherwise returns false.

Calls C++ function: bool operator>=(QChar lhs, QStringView rhs).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for bool operator>=(QChar c1, QChar c2):

Returns true if the numeric Unicode value of c1 is greater than or equal to that of c2; otherwise returns false.

source§

impl Gt<Ref<QChar>> for QChar

source§

unsafe fn gt(&self, c2: &Ref<QChar>) -> bool

Returns true if the numeric Unicode value of c1 is greater than that of c2; otherwise returns false.

Calls C++ function: bool operator>(QChar c1, QChar c2).

C++ documentation:

Returns true if the numeric Unicode value of c1 is greater than that of c2; otherwise returns false.

source§

impl Gt<Ref<QLatin1String>> for QChar

source§

unsafe fn gt(&self, rhs: &Ref<QLatin1String>) -> bool

Calls C++ function: bool operator>(QChar lhs, QLatin1String rhs).

source§

impl Gt<Ref<QString>> for QChar

source§

unsafe fn gt(&self, rhs: &Ref<QString>) -> bool

Calls C++ function: bool operator>(QChar lhs, const QString& rhs).

source§

impl Gt<Ref<QStringRef>> for QChar

source§

unsafe fn gt(&self, rhs: &Ref<QStringRef>) -> bool

Calls C++ function: bool operator>(QChar lhs, const QStringRef& rhs).

source§

impl Gt<Ref<QStringView>> for QChar

Available on cpp_lib_version="5.11.3" or cpp_lib_version="5.12.2" or cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.
source§

unsafe fn gt(&self, rhs: &Ref<QStringView>) -> bool

Calls C++ function: bool operator>(QChar lhs, QStringView rhs).

source§

impl Le<Ref<QChar>> for QChar

source§

unsafe fn le(&self, c2: &Ref<QChar>) -> bool

Returns true if the numeric Unicode value of c1 is less than or equal to that of c2; otherwise returns false.

Calls C++ function: bool operator<=(QChar c1, QChar c2).

C++ documentation:

Returns true if the numeric Unicode value of c1 is less than or equal to that of c2; otherwise returns false.

source§

impl Le<Ref<QLatin1String>> for QChar

source§

unsafe fn le(&self, rhs: &Ref<QLatin1String>) -> bool

Returns true if the numeric Unicode value of c1 is less than or equal to that of c2; otherwise returns false.

Calls C++ function: bool operator<=(QChar lhs, QLatin1String rhs).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for bool operator<=(QChar c1, QChar c2):

Returns true if the numeric Unicode value of c1 is less than or equal to that of c2; otherwise returns false.

source§

impl Le<Ref<QString>> for QChar

source§

unsafe fn le(&self, rhs: &Ref<QString>) -> bool

Returns true if the numeric Unicode value of c1 is less than or equal to that of c2; otherwise returns false.

Calls C++ function: bool operator<=(QChar lhs, const QString& rhs).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for bool operator<=(QChar c1, QChar c2):

Returns true if the numeric Unicode value of c1 is less than or equal to that of c2; otherwise returns false.

source§

impl Le<Ref<QStringRef>> for QChar

source§

unsafe fn le(&self, rhs: &Ref<QStringRef>) -> bool

Returns true if the numeric Unicode value of c1 is less than or equal to that of c2; otherwise returns false.

Calls C++ function: bool operator<=(QChar lhs, const QStringRef& rhs).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for bool operator<=(QChar c1, QChar c2):

Returns true if the numeric Unicode value of c1 is less than or equal to that of c2; otherwise returns false.

source§

impl Le<Ref<QStringView>> for QChar

Available on cpp_lib_version="5.11.3" or cpp_lib_version="5.12.2" or cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.
source§

unsafe fn le(&self, rhs: &Ref<QStringView>) -> bool

Returns true if the numeric Unicode value of c1 is less than or equal to that of c2; otherwise returns false.

Calls C++ function: bool operator<=(QChar lhs, QStringView rhs).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for bool operator<=(QChar c1, QChar c2):

Returns true if the numeric Unicode value of c1 is less than or equal to that of c2; otherwise returns false.

source§

impl Lt<Ref<QChar>> for QChar

source§

unsafe fn lt(&self, c2: &Ref<QChar>) -> bool

Returns true if the numeric Unicode value of c1 is less than that of c2; otherwise returns false.

Calls C++ function: bool operator<(QChar c1, QChar c2).

C++ documentation:

Returns true if the numeric Unicode value of c1 is less than that of c2; otherwise returns false.

source§

impl Lt<Ref<QLatin1String>> for QChar

source§

unsafe fn lt(&self, rhs: &Ref<QLatin1String>) -> bool

Calls C++ function: bool operator<(QChar lhs, QLatin1String rhs).

source§

impl Lt<Ref<QString>> for QChar

source§

unsafe fn lt(&self, rhs: &Ref<QString>) -> bool

Calls C++ function: bool operator<(QChar lhs, const QString& rhs).

source§

impl Lt<Ref<QStringRef>> for QChar

source§

unsafe fn lt(&self, rhs: &Ref<QStringRef>) -> bool

Calls C++ function: bool operator<(QChar lhs, const QStringRef& rhs).

source§

impl Lt<Ref<QStringView>> for QChar

Available on cpp_lib_version="5.11.3" or cpp_lib_version="5.12.2" or cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.
source§

unsafe fn lt(&self, rhs: &Ref<QStringView>) -> bool

Calls C++ function: bool operator<(QChar lhs, QStringView rhs).

source§

impl PartialEq<Ref<QChar>> for QChar

source§

fn eq(&self, c2: &Ref<QChar>) -> bool

Returns true if c1 and c2 are the same Unicode character; otherwise returns false.

Calls C++ function: bool operator==(QChar c1, QChar c2).

C++ documentation:

Returns true if c1 and c2 are the same Unicode character; otherwise returns false.

1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<Ref<QLatin1String>> for QChar

source§

fn eq(&self, rhs: &Ref<QLatin1String>) -> bool

Returns true if c1 and c2 are the same Unicode character; otherwise returns false.

Calls C++ function: bool operator==(QChar lhs, QLatin1String rhs).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for bool operator==(QChar c1, QChar c2):

Returns true if c1 and c2 are the same Unicode character; otherwise returns false.

1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<Ref<QString>> for QChar

source§

fn eq(&self, rhs: &Ref<QString>) -> bool

Returns true if c1 and c2 are the same Unicode character; otherwise returns false.

Calls C++ function: bool operator==(QChar lhs, const QString& rhs).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for bool operator==(QChar c1, QChar c2):

Returns true if c1 and c2 are the same Unicode character; otherwise returns false.

1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<Ref<QStringRef>> for QChar

source§

fn eq(&self, rhs: &Ref<QStringRef>) -> bool

Returns true if c1 and c2 are the same Unicode character; otherwise returns false.

Calls C++ function: bool operator==(QChar lhs, const QStringRef& rhs).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for bool operator==(QChar c1, QChar c2):

Returns true if c1 and c2 are the same Unicode character; otherwise returns false.

1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<Ref<QStringView>> for QChar

Available on cpp_lib_version="5.11.3" or cpp_lib_version="5.12.2" or cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.
source§

fn eq(&self, rhs: &Ref<QStringView>) -> bool

Returns true if c1 and c2 are the same Unicode character; otherwise returns false.

Calls C++ function: bool operator==(QChar lhs, QStringView rhs).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for bool operator==(QChar c1, QChar c2):

Returns true if c1 and c2 are the same Unicode character; otherwise returns false.

1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

§

impl RefUnwindSafe for QChar

§

impl Send for QChar

§

impl Sync for QChar

§

impl Unpin for QChar

§

impl UnwindSafe for QChar

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T, U> CastInto<U> for T
where U: CastFrom<T>,

source§

unsafe fn cast_into(self) -> U

Performs the conversion. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> StaticUpcast<T> for T

source§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.