Transforms a string based on locale-specific information.
#include <string.h> | Required only for function declarations |
size_t strxfrm( char *string1, const char *string2, size_t count );
string1 | String to which transformed version of string2 is returned | |
string2 | String to transform | |
count | Maximum number of characters to be placed in string1 |
The strxfrm function transforms the string pointed to by string2 into a new collated form that is stored in string1. No more than count characters (including the null character) are transformed and placed into the resulting string.
The transformation is made using the locale-specific information set by the setlocale function.
After the transformation, a call to strcmp with the two transformed strings will yield identical results to a call to strcoll applied to the original two strings.
The value of the following expression is the size of the array needed to hold the transformation of the source string:
1 + strxfrm( NULL, string, 0 )
Currently, the run-time library supports the "C" locale only; thus strxfrm is equivalent to the following:
strncpy( _string1, _string2, _count );
return( strlen( _string2 ) );
The strxfrm function returns the length of the transformed string, not counting the terminating null character. If the return value is greater than or equal to count, the contents of string1 are unpredictable.
Standards:ANSI
16-Bit:DOS, QWIN, WIN, WIN DLL
32-Bit:DOS32X