Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QLatin1Char Class Reference

\inmodule QtCore \reentrant More...

#include <qchar.h>

+ Collaboration diagram for QLatin1Char:

Public Member Functions

constexpr QLatin1Char (char c) noexcept
 Constructs a Latin-1 character for c.
 
constexpr char toLatin1 () const noexcept
 Converts a Latin-1 character to an 8-bit ASCII representation of the character.
 
constexpr char16_t unicode () const noexcept
 Converts a Latin-1 character to an 16-bit-encoded Unicode representation of the character.
 

Friends

constexpr bool comparesEqual (const QLatin1Char &lhs, const QLatin1Char &rhs) noexcept
 
constexpr Qt::strong_ordering compareThreeWay (const QLatin1Char &lhs, const QLatin1Char &rhs) noexcept
 
constexpr bool comparesEqual (const QLatin1Char &lhs, char rhs) noexcept
 
constexpr Qt::strong_ordering compareThreeWay (const QLatin1Char &lhs, char rhs) noexcept
 

Related Symbols

(Note that these are not member symbols.)

 operator""_L1 (char ch)
 

Detailed Description

\inmodule QtCore \reentrant

The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.

This class is only useful to construct a QChar with 8-bit character.

See also
QChar, QLatin1StringView, QString

Definition at line 17 of file qchar.h.

Constructor & Destructor Documentation

◆ QLatin1Char()

QLatin1Char::QLatin1Char ( char c)
inlineexplicitconstexprnoexcept

Constructs a Latin-1 character for c.

This constructor should be used when the encoding of the input character is known to be Latin-1.

Definition at line 20 of file qchar.h.

Member Function Documentation

◆ toLatin1()

const char QLatin1Char::toLatin1 ( ) const
inlineconstexprnoexcept

Converts a Latin-1 character to an 8-bit ASCII representation of the character.

Definition at line 21 of file qchar.h.

Referenced by QAnyStringViewUtils::doesContain().

+ Here is the caller graph for this function:

◆ unicode()

QLatin1Char::unicode ( ) const
inlineconstexprnoexcept

Converts a Latin-1 character to an 16-bit-encoded Unicode representation of the character.

Definition at line 22 of file qchar.h.

Referenced by rotateSlashesDotsAndMiddots(), and to_unicode().

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ comparesEqual [1/2]

constexpr bool comparesEqual ( const QLatin1Char & lhs,
char rhs )
friend

Definition at line 32 of file qchar.h.

◆ comparesEqual [2/2]

constexpr bool comparesEqual ( const QLatin1Char & lhs,
const QLatin1Char & rhs )
friend

Definition at line 25 of file qchar.h.

◆ compareThreeWay [1/2]

constexpr Qt::strong_ordering compareThreeWay ( const QLatin1Char & lhs,
char rhs )
friend

Definition at line 35 of file qchar.h.

◆ compareThreeWay [2/2]

constexpr Qt::strong_ordering compareThreeWay ( const QLatin1Char & lhs,
const QLatin1Char & rhs )
friend

Definition at line 28 of file qchar.h.

◆ operator""_L1()

operator""_L1 ( char ch)
related
Since
6.4

Literal operator that creates a QLatin1Char out of ch.

The following code creates a QLatin1Char:

auto ch = 'a'_L1;
See also
Qt::Literals::StringLiterals

Definition at line 638 of file qchar.h.

References ch.


The documentation for this class was generated from the following files: