strxfrm(3)
Name
strxfrm − string transformation
Syntax
size_t strxfrm (to, from, maxsize)
char *to;
char *from;
size_t maxsize;
Description
The strxfrm function transforms the string pointed to by from and places the resulting string into the array pointed to by to. The transformation is such that two transformed strings can be ordered by the strcmp function as appropriate to the program’s locale category LC_COLLATE.
The length of the resulting string may be much longer than the original. No more than maxsize characters are placed into the resulting string including the terminator. If the transformed string does not exceed maxsize characters, the number of characters (less the terminator) is returned. Otherwise the number of characters (less the terminator) in the transformed string is returned and the contents of the array are undefined.
International Environment
LC_COLLATEContains the user requirements for language, territory, and codeset for the character collation format. LC_COLLATE affects the behavior of regular expressions and the string collation functions in strxfrm. If LC_COLLATE is not defined in the current environment, LANG provides the necessary default.
LANGIf this environment is set and valid, strxfrm uses the international language database named in the definition to determine the character collation formatting rules. If LC_COLLATE is defined, its definition supercedes the definition of LANG.