Logo Search packages:      
Sourcecode: icu version File versions

UCollationResult RuleBasedCollator::compare ( UCharIterator sIter,
UCharIterator tIter,
UErrorCode status 
) const [virtual]

Compares two strings using the Collator. Returns whether the first one compares less than/equal to/greater than the second one. This version takes UCharIterator input.

Parameters:
sIterthe first ("source") string iterator
tIterthe second ("target") string iterator
statusICU status
Returns:
UCOL_LESS, UCOL_EQUAL or UCOL_GREATER ICU 4.2

Reimplemented from Collator.

Definition at line 400 of file tblcoll.cpp.

References U_SUCCESS, UCOL_EQUAL, and ucollator.

                                                                      {
    if(U_SUCCESS(status)) {
        return ucol_strcollIter(ucollator, &sIter, &tIter, &status);
    } else {
        return UCOL_EQUAL;
    }
}

Generated by  Doxygen 1.6.0   Back to index