QLatin1Char Struct
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character. More...
| Header: | #include <QLatin1Char> |
Public Functions
| QLatin1Char(char c) | |
| char | toLatin1() const |
| char16_t | unicode() const |
Related Non-Members
| QLatin1Char | operator""_L1(char ch) |
Detailed Description
\inmoduleQtCore \reentrant
\ingroupstring-processing
This class is only useful to construct a QChar with 8-bit character.
See also QChar, QLatin1StringView, and QString.
Member Function Documentation
[explicit constexpr noexcept] QLatin1Char::QLatin1Char(char c)
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.
[constexpr noexcept] char QLatin1Char::toLatin1() const
Converts a Latin-1 character to an 8-bit ASCII representation of the character.
[constexpr noexcept] char16_t QLatin1Char::unicode() const
Converts a Latin-1 character to an 16-bit-encoded Unicode representation of the character.
Related Non-Members
[constexpr noexcept] QLatin1Char operator""_L1(char ch)
\since6.4
Literal operator that creates a QLatin1Char out of ch.
The following code creates a QLatin1Char:
using namespace Qt::Literals::StringLiterals; auto ch = 'a'_L1;
See also Qt::Literals::StringLiterals.