43#include <rtl/character.hxx>
44#include <unicode/uchar.h>
45#include <unicode/utypes.h>
46#include <unicode/uscript.h>
61 std::fill_n(ma00, 0xff, -1);
62 std::fill_n(ma20, 0x7f, -1);
63 std::fill_n(ma30, 0x7f, -1);
110 int32_t getPairIndex(UChar32 ch)
const
114 if (ch >= 0x2000 && ch < 0x207f)
115 return ma20[
ch - 0x2000];
116 if (ch >= 0x3000 && ch < 0x307f)
117 return ma30[
ch - 0x3000];
123UScriptCode getScript(UChar32 ch, UErrorCode* status)
128 if (u_getIntPropertyValue(ch, UCHAR_GENERAL_CATEGORY) == U_NON_SPACING_MARK)
129 return USCRIPT_INHERITED;
131 UScriptCode
script = uscript_getScript(ch, status);
132 if (U_FAILURE(*status))
138 if (script == USCRIPT_KATAKANA || script == USCRIPT_KATAKANA_OR_HIRAGANA)
139 return USCRIPT_HIRAGANA;
154 return scriptOne <= USCRIPT_INHERITED || scriptTwo <= USCRIPT_INHERITED || scriptOne == scriptTwo;
160 UErrorCode error = U_ZERO_ERROR;
181 if (rtl::isLowSurrogate(low)) {
182 ch = rtl::combineSurrogates(high, low);
187 UScriptCode
sc = getScript(
ch, &error);
196 if (pairIndex >= 0) {
197 if ((pairIndex & 1) == 0) {
205 int32_t pi = pairIndex & ~1;
222 if (scriptCode <= USCRIPT_INHERITED && sc > USCRIPT_INHERITED) {
234 if (pairIndex >= 0 && (pairIndex & 1) != 0 &&
parenSP >= 0) {
static const char fgClassID
The address of this static class variable serves as this class's ID for ICU "poor man's RTTI".
std::vector< ParenStackEntry > parenStack
static bool sameScript(int32_t scriptOne, int32_t scriptTwo)
const PairIndices gPairIndices