strxfrm function — Transforms a string for collation
size_t strxfrm(char* dst, const char* src, size_t n)
The strxfrm
function
transforms the src
string by
converting each character to its collation order equivalent. The
equivalent is copied into dst
.
Thus, after transforming two different strings with strxfrm
, the transformed strings can be
compared by calling strcmp
to
obtain the same result as calling strcoll
on the original strings.
No more than n
bytes are
stored in dst
, including the
trailing null character. If n
is
0
, dst
can be null.
The return value is the number of transformed characters
written to dst
.