The
wcsxfrm ();
function transforms a null-terminated wide character string pointed to by
Fa src
according to the current locale collation order
then copies the transformed string
into
Fa dst .
No more than
Fa n
wide characters are copied into
Fa dst ,
including the terminating null character added.
If
Fa n
is set to 0
(it helps to determine an actual size needed
for transformation),
Fa dst
is permitted to be a
NULL
pointer.
Comparing two strings using
wcscmp ();
after
wcsxfrm ();
is equivalent to comparing
two original strings with
wcscoll (.);
RETURN VALUES
Upon successful completion,
wcsxfrm ();
returns the length of the transformed string not including
the terminating null character.
If this value is
Fa n
or more, the contents of
Fa dst
are indeterminate.
The
wcsxfrm ();
function
conforms to
St -isoC-99 .
BUGS
The current implementation of
wcsxfrm ();
only works in single-byte
LC_CTYPE
locales, and falls back to using
wcsncpy ();
in locales with extended character sets.
Comparing two strings using
wcscmp ();
after
wcsxfrm ();
is
not
always equivalent to comparison with
wcscoll (;);
wcsxfrm ();
only stores information about primary collation weights into
Fa dst ,
whereas
wcscoll ();
compares characters using both primary and secondary weights.