Logo Search packages:      
Sourcecode: icu version File versions  Download package

UBool StringMatcher::matchesIndexValue ( uint8_t  v  )  const [virtual]

Implement UnicodeMatcher Returns TRUE if this matcher will match a character c, where c & 0xFF == v, at offset, in the forward direction (with limit > offset). This is used by RuleBasedTransliterator for indexing.

Parameters:
v the given value
Returns:
TRUE if this matcher will match a character c, where c & 0xFF == v
Implement UnicodeMatcher

Implements UnicodeMatcher.

Definition at line 185 of file strmatch.cpp.

References UnicodeString::char32At(), data, UnicodeString::length(), TransliterationRuleData::lookupMatcher(), UnicodeMatcher::matchesIndexValue(), pattern, and TRUE.

                                                      {
    if (pattern.length() == 0) {
        return TRUE;
    }
    UChar32 c = pattern.char32At(0);
    const UnicodeMatcher *m = data->lookupMatcher(c);
    return (m == 0) ? ((c & 0xFF) == v) : m->matchesIndexValue(v);
}


Generated by  Doxygen 1.6.0   Back to index