The strxfrm() function transforms the string pointed to by str2 so that it can be used by the strcmp() function and puts the result into the string pointed to by str1. After the transformation, the outcome of a strcmp() using str1 and a strcoll() using the original string pointed to by str2 will be the same. Not more than count characters are written to the array pointed to by str1.
The strxfrm() function returns the length of the transformed string.
Following is the syntax of the strxfrm() function :
#include<string.h> size_t strxfrm(char *str1, const char *str2, size_t count);
Following line transforms the first 10 characters of the string pointed to by s2 and puts the result in the string pointed to by s1.
strxfrm(s1, s2, 10);
« Previous Chapter Next Function »