This documentation is copyright © 1998-2001 Sandro Sigala <sandro@sigala.it>.
All rights reserved.
Released under the GNU General Public License.
strxfrm
Prototype
#include <string.h>
size_t strxfrm(char *dest, const char *src, size_t n);
Description
Transforms the src
string into a form such that the result of strcmp
on two strings that has been transformed with strxfrm
is the same as
the result of strcoll
on the two strings before their transformation.
The resulting string (of length equal or less that n
characters,
including the terminating null character) is placed into the dest
array.
If n
is zero, dest
is permitted to be NULL
. This might
be useful to determine the required dest
array size:
size = strxfrm(NULL, src, 0) + 1;
If copying takes place between objects that overlap, the behavior is
undefined.
The strxfrm
function returns the exact number of characters placed
into the dest
array.
References
ISO C 9899:1990 7.11.4.5