24 String functions
case controls the uppercase and lowercase letter order. Possible values are 0 (use
order specified in tertiary strength), 1 (uppercase first), or 2 (lowercase first). -1
means to use the default value for the locale. Any other values are treated as 0.
ustrcompareex("Caf´e","caf´e","fr", -1, 1, -1, -1, -1, -1, -1) = -1
ustrcompareex("Caf´e","caf´e","fr", -1, 2, -1, -1, -1, -1, -1) = 1
cslv controls whether an extra case level between the secondary level and the
tertiary level is generated. Possible values are 0 (off) or 1 (on). -1 means to use
the default value for the locale. Any other values are treated as 0. Combining this
setting to be “on” and the strength setting to be primary can achieve the effect
of ignoring the diacritical differences but preserving the case differences. If the
setting is “on”, the result is also affected by the case setting.
ustrcompareex("caf´e","Cafe","fr", 1, -1, 1, -1, -1, -1, -1) = -1
ustrcompareex("caf´e","Cafe","fr", 1, 1, 1, -1, -1, -1, -1) = 1
norm controls whether the normalization check and normalizations are performed.
Possible values are 0 (off) or 1 (on). -1 means to use the default value for the locale.
Any other values are treated as 0. Most languages do not require normalization
for comparison. Normalization is needed in languages that use multiple combining
characters such as Arabic, ancient Greek, or Hebrew.
num controls how contiguous digit substrings are sorted. Possible values are 0
(off) or 1 (on). -1 means to use the default value for the locale. Any other values
are treated as 0. If the setting is “on”, substrings consisting of digits are sorted
based on the numeric value. For example, “100” is after value “20” instead of
before it. Note that the digit substring is limited to 254 digits, and plus/minus
signs, decimals, or exponents are not supported.
ustrcompareex("100", "20","en", -1, -1, -1, -1, 0, -1, -1) = -1
ustrcompareex("100", "20","en", -1, -1, -1, -1, 1, -1, -1) = 1
alt controls how spaces and punctuation characters are handled. Possible values
are 0 (use primary strength) or 1 (alternative handling). Any other values are
treated as 0. If the setting is 1 (alternative handling), “onsite”, “on-site”, and “on
site” are considered equals.
ustrcompareex("onsite", "on-site","en",
-1, -1, -1, -1, -1, 1, -1) = 0
ustrcompareex("onsite", "on site","en",
-1, -1, -1, -1, -1, 1, -1) = 0
ustrcompareex("onsite", "on-site","en",
-1, -1, -1, -1, -1, 0, -1) = 1
fr controls the direction of the secondary strength. Possible values are 0 (off)
or 1 (on). -1 means to use the default value for the locale. All other values are
treated as “off”. If the setting is “on”, the diacritical letters are sorted backward.
Note that the setting is “on” by default only for Canadian French (locale fr CA).
ustrcompareex("cot´e", "c^ote","fr CA",-1,-1,-1,-1,-1,-1,0) = -1
ustrcompareex("cot´e", "c^ote","fr CA",-1,-1,-1,-1,-1,-1,1) = 1
ustrcompareex("cot´e", "c^ote","fr CA",-1,-1,-1,-1,-1,-1,-1) = 1
ustrcompareex("cot´e", "c^ote","fr",-1,-1,-1,-1,-1,-1,-1) = 1