The following functions are used for string comparison based on the collation data of the current locale:
String comparison using collating information
String transformation
Wide-character string comparison using collating information
Wide-character string transformation
For better performance when sorting large lists of strings, use the strxfrm() and strcmp() functions instead of the strcoll() function, and the wcsxfrm() and wcscmp() functions instead of the wcscoll() function.
When using the strxfrm() and wcsxfrm() functions, note that the format of the transformed string is not in a human-readable form. These functions are used as input to the strcmp() and wcscmp() function calls respectively.
For more information, see the strcmp(3C) and wcscmp(3C) man pages.