wcscoll

Compares two wide-character strings, according to the LC_COLLATE category setting of the code page currently in use.

Library:LibC
Classification:ANSI
Service:Characters and Strings

Syntax

  #include <wchar.h> 
   
  int  wcscoll (
     const wchar_t   *ws1,
     const wchar_t   *ws2);
  

Parameters

ws1

(IN) Points to a null-terminated string to compare.

ws2

(IN) Points to a null-terminated string to compare.

Return Values

Returns 0 if the two wide-character strings match. Otherwise, returns an integer

  • Less than 0 if ws1 is less than ws2.

  • Greater than 0 if ws1 is greater than ws2.

Remarks

The comparison uses the collating sequence selected by setlocale. The function is equivalent to wcscmp when the collating sequence is selected from the ā€œCā€ locale.

See Also

wcscmp