Logo Search packages:      
Sourcecode: icu version File versions

Collator::EComparisonResult Collator::compare ( const UChar source,
int32_t  sourceLength,
const UChar target,
int32_t  targetLength 
) const [virtual]

The comparison function compares the character data stored in two different string arrays. Returns information about whether a string array is less than, greater than or equal to another string array.

Parameters:
sourcethe source string array to be compared with.
sourceLengththe length of the source string array. If this value is equal to -1, the string array is null-terminated.
targetthe string that is to be compared with the source string.
targetLengththe length of the target string array. If this value is equal to -1, the string array is null-terminated.
Returns:
Returns a byte value. GREATER if source is greater than target; EQUAL if source is equal to target; LESS if source is less than target
Deprecated:
ICU 2.6 use the overload with UErrorCode &

Reimplemented in RuleBasedCollator, and TestCollator.

Definition at line 425 of file coll.cpp.

References compare(), and U_ZERO_ERROR.

{
    UErrorCode ec = U_ZERO_ERROR;
    return (Collator::EComparisonResult)compare(source, sourceLength, target, targetLength, ec);
}

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index