Logo Search packages:      
Sourcecode: icu version File versions

int32_t DecimalFormat::match ( const UnicodeString text,
int32_t  pos,
const UnicodeString str 
) [static, private]

Match a string at text[pos] and return the index of the next character upon success. Return -1 on failure. Match a run of white space in str with a run of white space in text.

Definition at line 2594 of file decimfmt.cpp.

References UnicodeString::char32At(), PatternProps::isWhiteSpace(), UnicodeString::length(), match(), skipPatternWhiteSpace(), and U16_LENGTH.

                                                                                             {
    for (int32_t i=0; i<str.length() && pos >= 0; ) {
        UChar32 ch = str.char32At(i);
        i += U16_LENGTH(ch);
        if (PatternProps::isWhiteSpace(ch)) {
            i = skipPatternWhiteSpace(str, i);
        }
        pos = match(text, pos, ch);
    }
    return pos;
}

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index