Compares wide character strings.
Standard C Library (libc.a)
The wcscoll and wcscoll _l subroutines compare the two wide-character strings pointed to by the WcString1 and WcString2 parameters based on the collation values specified by the LC_COLLATE environment variable of the current locale or in the locale represented by Locale.
The wcscoll and wcscoll _l subroutine may be unsuccessful if the wide character strings specified by the WcString1 or WcString2 parameter contains characters outside the domain of the current collating sequence or in the locale represented by the Locale collating sequence.
Item | Description |
---|---|
WcString1 | Points to a wide-character string. |
WcString2 | Points to a wide-character string. |
Locale | Specifies the locale in which character has to be converted. |
The wcscoll and wcscoll _l subroutine returns the following values:
Item | Description |
---|---|
< 0 | The collation value of the WcString1 parameter is less than that of the WcString2 parameter. |
=0 | The collation value of the WcString1 parameter is equal to that of the WcString2 parameter. |
>0 | The collation value of the WcString1 parameter is greater than that of the WcString2 parameter. |
The wcscoll and wcscoll _l subroutines indicate error conditions by setting the errno global variable. However, there is no return value to indicate an error. To check for errors, the errno global variable should be set to 0, then checked upon return from the wcscoll, and wcscoll _l subroutines. If the errno global variable is nonzero, an error occurred.
Item | Description |
---|---|
EINVAL | The WcString1 or WcString2 arguments contain wide-character codes outside the domain of the collating sequence. |