The strxfrm function

Name

strxfrm -- 

Synopsis

#include <string.h>

size_t strxfrm (char *s1, char *s2, size_t n);

Description

The strxfrm function transforms the string pointed to by s2 and places the resulting string into the array pointed to by s1. The transformation is such that if the strcmpfunction is applied to two transformed strings, it returns a value greater than, equal to, or less than zero, corresponding to the result of the strcoll function applied to the same two original strings. No more than n characters are placed into the resulting array pointed to by s1, including the terminating null character. If n is zero, s1 is permitted to be a null pointer. If copying takes place between objects that overlap, the behavior is undefined.

Returns

The strxfrm function returns the length of the transformed string (not including the terminating null character). If the value returned is n or more, then the contents of the array pointed to be s1 are indeterminate.

Implementation Notes

In the XGC library, the strxfrm function copies the characters with no transformation.