Qt 4.8
Public Functions | Properties | List of all members
QLatin1Char Class Reference

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

#include <qchar.h>

Public Functions

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

Properties

char ch
 

Detailed Description

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

This class is only useful to avoid the codec for C strings business in the QChar(ch) constructor. You can avoid it by writing QChar(ch, 0).

See also
QChar, QLatin1String, QString

Definition at line 55 of file qchar.h.

Constructors and Destructors

◆ QLatin1Char()

QLatin1Char::QLatin1Char ( char  c)
inlineexplicit

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 58 of file qchar.h.

58 : ch(c) {}
unsigned char c[8]
Definition: qnumeric_p.h:62
char ch
Definition: qchar.h:68

Functions

◆ toLatin1()

const char QLatin1Char::toLatin1 ( ) const
inline

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

Definition at line 63 of file qchar.h.

Referenced by QConcatenable< QLatin1Char >::appendTo(), QChar::lowSurrogate(), and QLatin1Char().

63 { return ch; }
char ch
Definition: qchar.h:68

◆ unicode()

const ushort QLatin1Char::unicode ( ) const
inline

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

Definition at line 64 of file qchar.h.

Referenced by QLatin1Char(), rotateSlashesDotsAndMiddots(), tryDriveUNCFallback(), and QChar::unicode().

64 { return ushort(uchar(ch)); }
char ch
Definition: qchar.h:68
unsigned char uchar
Definition: qglobal.h:994
unsigned short ushort
Definition: qglobal.h:995

Properties

◆ ch

char QLatin1Char::ch
private

Definition at line 68 of file qchar.h.

Referenced by QLatin1Char(), toLatin1(), and unicode().


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