function
<cwchar>
wcscoll
int wcscoll (const wchar_t* wcs1, const wchar_t* wcs2);
Compare two wide strings using locale
Compares the C wide string wcs1 to the C wide string wcs2, both interpreted appropriately according to the LC_COLLATE category of the C locale currently selected.
This function starts comparing the first character of each string. If they are considered equal to each other continues with the following pair until the characters differ or until a null wide character signaling the end of a string is reached.
The behavior of this function depends on the LC_COLLATE category of the selected C locale.
This is the wide character equivalent of strcoll (<cstring>).
Parameters
- wcs1
- C wide string to be compared.
- wcs2
- C wide string to be compared.
Return Value
Returns an integral value indicating the relationship between the strings:
A zero value indicates that both strings are equal.
A value greater than zero indicates that the first character that does not match has a greater value in wcs1 than in wcs2; And a value less than zero indicates the opposite.
See also
- strcoll
- Compare two strings using locale (function
)
- wcscmp
- Compare two strings (function
)
- wcsncmp
- Compare characters of two wide strings (function
)
- wmemcmp
- Compare two blocks of wide characters (function
)