Logo Search packages:      
Sourcecode: icu version File versions

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

Does the same thing as compare but limits the comparison to a specified length

sourcethe source string to be compared with.
targetthe string that is to be compared with the source string.
lengththe length the comparison is limited to
Returns a byte value. GREATER if source (up to the specified length) is greater than target; EQUAL if source (up to specified length) is equal to target; LESS if source (up to the specified length) is less than target.
ICU 2.6 use the overload with UErrorCode &

Reimplemented in RuleBasedCollator, and TestCollator.

Definition at line 416 of file coll.cpp.

References compare(), and U_ZERO_ERROR.

    UErrorCode ec = U_ZERO_ERROR;
    return (Collator::EComparisonResult)compare(source, target, length, ec);

Here is the call graph for this function:

Generated by  Doxygen 1.6.0   Back to index