6.0.0-rc4Source

QLatin1Char Class

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

Header#include <QLatin1Char>
CMaketarget_link_libraries(app PRIVATE Nt::Core)
ModuleNt Core C++ Classes

List of all members, including inherited members

Public Functions

QLatin1Char(char c)
chartoLatin1() const
char16_tunicode() const

Detailed Description

QLatin1Char wraps a single char so that it can be passed where a QChar is expected without being ambiguous with other integer types. It is converted to a QChar by interpreting the byte as a Latin-1 code point.

See also QChar and QLatin1StringView.

Differences from Qt

None.

Member Function Documentation

[explicit, constexpr] QLatin1Char::QLatin1Char(char c)

Constructs a Latin-1 character for c.

[constexpr] char QLatin1Char::toLatin1() const

Returns the Latin-1 character value as a char.

See also unicode().

[constexpr] char16_t QLatin1Char::unicode() const

Returns the Unicode code unit for this character, in the range 0 to 255.

See also toLatin1().