- for (int32_t i=0; i<pattern.length(); i+=UTF_CHAR_LENGTH(ch)) {
- ch = pattern.char32At(i);
- const UnicodeMatcher* matcher = data->lookupMatcher(ch);
- if (matcher == NULL) {
- toUnionTo.add(ch);
- } else {
- matcher->addMatchSetTo(toUnionTo);
- }
+ for (int32_t i=0; i<pattern.length(); i+=U16_LENGTH(ch)) {
+ ch = pattern.char32At(i);
+ const UnicodeMatcher* matcher = data->lookupMatcher(ch);
+ if (matcher == NULL) {
+ toUnionTo.add(ch);
+ } else {
+ matcher->addMatchSetTo(toUnionTo);
+ }