24#ifndef KJS_UNICODE_QT4_H
25#define KJS_UNICODE_QT4_H
29#include "../UnicodeCategory.h"
33 inline int toLower(uint16_t* str,
int strLength, uint16_t*& destIfNeeded)
37 for (
int i = 0; i < strLength; ++i)
38 str[i] = QChar(str[i]).toLower().unicode();
43 inline int toUpper(uint16_t* str,
int strLength, uint16_t*& destIfNeeded)
47 for (
int i = 0; i < strLength; ++i)
48 str[i] = QChar(str[i]).toUpper().unicode();
55 return (c & 0xffff0000) == 0 && QChar((
unsigned short)c).category() == QChar::Other_Format;
60 return (c & 0xffff0000) == 0 && QChar((
unsigned short)c).category() == QChar::Separator_Space;
66 if ((c & 0xffff0000) != 0)
69 switch (QChar((
unsigned short)c).
category()) {
70 case QChar::Mark_NonSpacing:
72 case QChar::Mark_SpacingCombining:
74 case QChar::Mark_Enclosing:
76 case QChar::Number_DecimalDigit:
78 case QChar::Number_Letter:
80 case QChar::Number_Other:
82 case QChar::Separator_Space:
84 case QChar::Separator_Line:
86 case QChar::Separator_Paragraph:
88 case QChar::Other_Control:
90 case QChar::Other_Format:
92 case QChar::Other_Surrogate:
94 case QChar::Other_PrivateUse:
96 case QChar::Other_NotAssigned:
98 case QChar::Letter_Uppercase:
100 case QChar::Letter_Lowercase:
102 case QChar::Letter_Titlecase:
104 case QChar::Letter_Modifier:
106 case QChar::Letter_Other:
108 case QChar::Punctuation_Connector:
110 case QChar::Punctuation_Dash:
112 case QChar::Punctuation_Open:
114 case QChar::Punctuation_Close:
116 case QChar::Punctuation_InitialQuote:
118 case QChar::Punctuation_FinalQuote:
120 case QChar::Punctuation_Other:
122 case QChar::Symbol_Math:
124 case QChar::Symbol_Currency:
126 case QChar::Symbol_Modifier:
128 case QChar::Symbol_Other:
bool isFormatChar(int32_t c)
@ Punctuation_InitialQuote
CharCategory category(int32_t c)
int toUpper(uint16_t *str, int strLength, uint16_t *&destIfNeeded)
bool isSeparatorSpace(int32_t c)
int toLower(uint16_t *str, int strLength, uint16_t *&destIfNeeded)