U_CAPI void ucol_setStrength ( UCollator *coll, UCollationStrength strength)

Set the collation strength used in a UCollator

Documentation

Set the collation strength used in a UCollator. The strength influences how strings are compared.

Example of use:

.       UCollationResult result;
.       UChar *source, *target;
.       UErrorCode status = U_ZERO_ERROR;
.       UCollator *myCollation = ucol_open("en_US", status);
.       if (U_FAILURE(&status)) return;
.       ucol_setStrength(myCollation, UCOL_PRIMARY);
.       u_uastrcpy(source, "abc");
.       u_uastrcpy(target, "ABC");
.       // result will be "abc" == "ABC"
.       // tertiary differences will be ignored
.       result = ucol_strcoll(myCollation, source, u_strlen(source), target, u_strlen(target));
Parameters:
coll - The UCollator to set.
strength - The desired collation strength; one of UCOL_PRIMARY, UCOL_SECONDARY, UCOL_TERTIARY, UCOL_IDENTICAL, UCOL_DEFAULT_STRENGTH
See Also:
ucol_getStrength

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de