Internationalizing and Localizing Applications in Oracle Solaris

Exit Print View

Updated: July 2014
 
 

String Collation

The following functions are used for string comparison based on the collation data of the current locale:

strcoll()

String comparison using collating information

strxfrm()

String transformation

wcscoll(), wscoll()

Wide-character string comparison using collating information

wcsxfrm(), wsxfrm()

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.