Logo Search packages:      
Sourcecode: icu version File versions

Collator::EComparisonResult RuleBasedCollator::compare ( const UnicodeString source,
const UnicodeString target 
) const [virtual]

Compares a range of character data stored in two different strings based on the collation rules. Returns information about whether a string is less than, greater than or equal to another string in a language. This can be overriden in a subclass.

sourcethe source string.
targetthe target string to be compared with the source string.
the comparison result. GREATER if the source string is greater than the target string, LESS if the source is less than the target. Otherwise, returns EQUAL.
ICU 2.6 Use overload with UErrorCode&

Compare two strings using this collator

Reimplemented from Collator.

Definition at line 379 of file tblcoll.cpp.

References UnicodeString::getBuffer(), getEComparisonResult(), UnicodeString::length(), and ucollator.

Referenced by compare(), CollationAPITest::TestDuplicate(), and CollationAPITest::TestNULLCharTailoring().

    return getEComparisonResult(ucol_strcoll(ucollator, source.getBuffer(), source.length(),
                                                        target.getBuffer(), target.length()));

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index