Guardian C Library Calls Reference Manual

Reference to Library Calls
Guardian TNS C Library Calls Reference Manual128833 3-215
strxfrm
strxfrm
The strxfrm function “transforms” a string into another such that the strcmp function can
be used to correctly compare two transformed” strings. The result is the same as if the
strcoll function had been used on the original strings.
s1
points to an array that will contain the transformed string. If n is zero, s1 is
permitted to be a null pointer.
s2
points to an array that contains the string that the strxfrm function will transform.
n
specifies the maximum number of characters that can be placed in the resulting array
pointed to by s1.
Return Value
is the length of the transformed string. This length does not include the terminating
null character. If the value returned is n or more, the contents of the array pointed to
by s1 are undefined.
Usage Guidelines
If s1 and s2 overlap, the result of s1 is undefined.
#include <stringh>
size_t strxfrm(char *s1, const char *s2, size_t n);