wcscoll

Compares two wide-character strings and returns an integer that indicates if the strings differ, and how they differ. The function uses the collating information in the LC_COLLATE category of the current locale to determine how the comparison is performed.

Format

#include  <wchar.h>

int wcscoll  (const wchar_t *ws1, const wchar_t
             *ws2);

Arguments

ws1, ws2
Pointers to wide-character strings.

Description

This function, unlike wcscmp, compares two strings in a locale-dependent manner. Because no value is reserved for error indication, the application must check for one by setting errno to 0 before the function call and testing it after the call.

See also the wcsxfrm function in this section.

Return Values
< 0  Indicates that ws1 is less than ws2
Indicates that the strings are equal. 
> 0  Indicates that ws1 is greater than ws2


Previous Page | Next Page | Table of Contents | Index