Your Browser is not longer supported
Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...
{{viewport.spaceProperty.prod}}
wcscoll - compare two wide character strings according to LC_COLLATE
&pagelevel(4)&pagelevel
Syntax | #include <wchar.h> int wcscoll(const wchar_t *ws1, const wchar_t *ws2); |
Description | wcscoll() lexically compares two wide character strings ws1 and ws2, in accordance with the collation sequence defined for the locale in LC_COLLATE .
|
Return val. | Integer value, where the following applies: |
| < 0 | ws1 is less than ws2 with regard to the defined collation sequence. |
| = 0 | ws1 and ws2 are equal with regard to the defined collation sequence. |
| > 0 | ws1 is greater than ws2 with regard to the defined collation sequence. |
Errors | wcscoll() will fail if:
|
EINVAL
| One of the two wide character strings cannot be converted into a multi-byte string.
|
Notes | Because there is no default value defined for if an error occurs, it is advisable to set errno to 0, then call wcscoll() and after the call check errno . If errno is not 0, assume that an error has occurred. For sorting long lists, the wcsxfmr() and wcscmp() functions should be used. Restriction This version of the C runtime system only supports 1-byte characters as wide character codes. They are of type wchar_t (see stddef.h ). (End) |
See also | wcsncmp() , wcsxfrm() , wchar.h .
|