Char
class Char { public: enum SpecialCharacter { Null = 0x0000, Nbsp = 0x00a0, ReplacementCharacter = 0xfffd, ObjectReplacementCharacter = 0xfffc, ByteOrderMark = 0xfeff, ByteOrderSwapped = 0xfffe, ParagraphSeparator = 0x2029, LineSeparator = 0x2028 }; // This enum maps the Unicode character categories. enum Category { NoCategory, Mark_NonSpacing, Mark_SpacingCombining, Mark_Enclosing, Number_DecimalDigit, Number_Letter, Number_Other, Separator_Space, Separator_Line, Separator_Paragraph, Other_Control, Other_Format, Other_Surrogate, Other_PrivateUse, Other_NotAssigned, Letter_Uppercase, Letter_Lowercase, Letter_Titlecase, Letter_Modifier, Letter_Other, Punctuation_Connector, Punctuation_Dash, Punctuation_Dask = Punctuation_Dash, Punctuation_Open, Punctuation_Close, Punctuation_InitialQuote, Punctuation_FinalQuote, Punctuation_Other, Symbol_Math, Symbol_Currency, Symbol_Modifier, Symbol_Other }; // This enum type defines the Unicode direction attributes. enum Direction { DirL, DirR, DirEN, DirES, DirET, DirAN, DirCS, DirB, DirS, DirWS, DirON, DirLRE, DirLRO, DirAL, DirRLE, DirRLO, DirPDF, DirNSM, DirBN }; // This enum type defines the Unicode decomposition attributes. enum Decomposition { Single, Canonical, Font, NoBreak, Initial, Medial, Final, Isolated, Circle, Super, Sub, Vertical, Wide, Narrow, Small, Square, Compat, Fraction }; // This enum type defines the Unicode joining attributes. enum Joining { OtherJoining, Dual, Right, Center }; // This enum type defines names for some of the Unicode combining classes. enum CombiningClass { Combining_BelowLeftAttached = 200, Combining_BelowAttached = 202, Combining_BelowRightAttached = 204, Combining_LeftAttached = 208, Combining_RightAttached = 210, Combining_AboveLeftAttached = 212, Combining_AboveAttached = 214, Combining_AboveRightAttached = 216, Combining_BelowLeft = 218, Combining_Below = 220, Combining_BelowRight = 222, Combining_Left = 224, Combining_Right = 226, Combining_AboveLeft = 228, Combining_Above = 230, Combining_AboveRight = 232, Combining_DoubleBelow = 233, Combining_DoubleAbove = 234, Combining_IotaSubscript = 240 }; // construct/copy/destruct Char(); Char(char); Char(unsigned char); Char(unsigned char, unsigned char); Char(unsigned short); Char(short); Char(int); Char(unsigned int); Char(const QChar &); Char(SpecialCharacter); // public member functions Category category() const; Direction direction() const; Decomposition decompositionTag() const; Joining joining() const; unsigned char combiningClass() const; int digitValue() const; Char lower() const; Char upper() const; bool mirrored() const; Char mirroredChar() const; unsigned char latin1() const; unsigned short unicode() const; operator unsigned char() const; operator char() const; bool isNull() const; bool isPrint() const; bool isPunct() const; bool isSpace() const; bool isMark() const; bool isLetter() const; bool isNumber() const; bool isLetterOrNumber() const; bool isDigit() const; bool isSymbol() const; unsigned char cell() const; unsigned char row() const; bool operator==(Char) const; bool operator!=(Char) const; bool operator<=(Char) const; bool operator>=(Char) const; bool operator<(Char) const; bool operator>(Char) const; operator QChar() const; static const Char null; static const Char replacement; static const Char byteOrderMark; static const Char byteOrderSwapped; static const Char nbsp; };
Char
construct/copy/destructConstructs a null Char (one that isNull()).
Constructs a Char corresponding to ASCII/Latin-1 character c.
Constructs a QChar corresponding to ASCII/Latin-1 character c.
Constructs a QChar for Unicode cell c in row r.
Constructs a QChar for the character with Unicode code point rc.
Constructs a QChar for the character with Unicode code point rc.
Constructs a QChar for the character with Unicode code point rc.
Constructs a QChar for the character with Unicode code point rc.
Constructs a copy of c. This is a deep copy, if such a lightweight object can be said to have deep copies.
Char
public member functionsReturns the character category.
Returns the character's direction.
Decomposes a character into its parts. Returns QString::null if no decomposition exists.
Returns information about the joining properties of the character (needed for example, for Arabic).
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.
Returns the numeric value of the digit or -1 if the character is not a digit.
Char lower() const;
Returns the lowercase equivalent when the character is uppercase. Otherwise returns the character itself.
Char upper() const;
Returns the uppercase equivalent when the character is lowercase. Otherwise returns the character itself.
Returns TRUE if the character is a mirrored character (should be reversed if the text direction is reversed).
Char mirroredChar() const;
Returns the mirrored character if this character is a mirrored character. Otherwise returns the character itself.
Returns the Latin-1 value of this character, or 0 if it cannot be represented in Latin-1.
Returns the numeric Unicode value.
Same as latin1().
Same as latin1().
Returns TRUE if the character is the Unicode character 0x0000 (ASCII NUL). Otherwise returns FALSE.
Returns TRUE if the character is a printable character. Otherwise returns FALSE.
Returns TRUE if the character is a punctuation mark.
Returns TRUE if the character is a separator character.
Returns TRUE if the character is a mark.
Returns TRUE if the character is a letter.
Returns TRUE if the character is a number.
Returns TRUE if the character is a letter or number.
Returns TRUE if the character is a decimal digit.
Returns TRUE if the character is a symbol (Symbol_* categories).
Returns the cell (least significant byte) of the Unicode character.
Returns the row (most significant byte) of the Unicode character.
Returns TRUE if the compared are the same Unicode characte.
Returns TRUE if the compared are not the same Unicode character.
Returns TRUE if the numeric Unicode value of the left is less than that of the right or they are the same Unicode character
Returns TRUE if the numeric Unicode value of the left is greater than that of the right or they are the same Unicode character
Returns TRUE if the numeric Unicode value of the left is less than that of the right.
Returns TRUE if the numeric Unicode value of the left is greater than that of the right.
A conversion to QChar.