Next: Case detection, Previous: Case mappings of substrings, Up: Case mappings <unicase.h>
[Contents][Index]
The following functions implement comparison that ignores differences in case and normalization.
Returns the case folded string.
Comparing u8_casefold (s1)
and u8_casefold (s2)
with the u8_cmp2
function is equivalent to comparing s1 and
s2 with u8_casecmp
.
The nf argument identifies the normalization form to apply after the case-mapping. It can also be NULL, for no normalization.
The resultbuf and lengthp arguments are as described in chapter Conventions.
Returns the case folded string. The case folding takes into account the case mapping contexts of the prefix and suffix strings.
The resultbuf and lengthp arguments are as described in chapter Conventions.
The following functions ignore locale-dependent collation rules, but do use locale-dependent case mappings (if iso639_language is not NULL).
Compares s1 and s2, ignoring differences in case and normalization.
The nf argument identifies the normalization form to apply after the case-mapping. It can also be NULL, for no normalization.
If successful, sets *resultp
to -1 if s1 < s2,
0 if s1 = s2, 1 if s1 > s2, and returns 0.
Upon failure, returns -1 with errno
set.
The following functions additionally take into account the sorting rules of the current locale.
Converts the string s of length n to a NUL-terminated byte
sequence, in such a way that comparing u8_casexfrm (s1)
and
u8_casexfrm (s2)
with the gnulib function memcmp2
is
equivalent to comparing s1 and s2 with u8_casecoll
.
nf must be either UNINORM_NFC
, UNINORM_NFKC
, or NULL for
no normalization.
The resultbuf and lengthp arguments are as described in chapter Conventions.
Compares s1 and s2, ignoring differences in case and normalization, using the collation rules of the current locale.
The nf argument identifies the normalization form to apply after the
case-mapping. It must be either UNINORM_NFC
or UNINORM_NFKC
.
It can also be NULL, for no normalization.
If successful, sets *resultp
to -1 if s1 < s2,
0 if s1 = s2, 1 if s1 > s2, and returns 0.
Upon failure, returns -1 with errno
set.
Next: Case detection, Previous: Case mappings of substrings, Up: Case mappings <unicase.h>
[Contents][Index]