Logo Search packages:      
Sourcecode: icu version File versions

virtual CollationKey& Collator::getCollationKey ( const UChar source,
int32_t  sourceLength,
CollationKey key,
UErrorCode status 
) const [pure virtual]

Transforms the string into a series of characters that can be compared with CollationKey::compareTo. It is not possible to restore the original string from the chars in the sort key. The generated sort key handles only a limited number of ignorable characters.

Use CollationKey::equals or CollationKey::compare to compare the generated sort keys.

If the source string is null, a null collation key will be returned.

Parameters:
sourcethe source string to be transformed into a sort key.
sourceLengthlength of the collation key
keythe collation key to be filled in
statusthe error code status.
Returns:
the collation key of the string based on the collation rules.
See also:
CollationKey::compare
Deprecated:
ICU 2.8 Use getSortKey(...) instead

Implemented in RuleBasedCollator, and TestCollator.


Generated by  Doxygen 1.6.0   Back to index