Logo Search packages:      
Sourcecode: icu version File versions  Download package

UCollationResult RuleBasedCollator::compare ( const UnicodeString source,
const UnicodeString target,
int32_t  length,
UErrorCode status 
) const [virtual]

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

source the source string to be compared with.
target the string that is to be compared with the source string.
length the length the comparison is limited to
status possible error code
Returns an enum value. UCOL_GREATER if source (up to the specified length) is greater than target; UCOL_EQUAL if source (up to specified length) is equal to target; UCOL_LESS if source (up to the specified length) is less than target. ICU 2.6

Implements Collator.

Definition at line 341 of file tblcoll.cpp.

References compare(), UnicodeString::getBuffer(), and UnicodeString::length().

    return compare(source.getBuffer(), uprv_min(length,source.length()), target.getBuffer(), uprv_min(length,target.length()), status);

Generated by  Doxygen 1.6.0   Back to index