wcscmp

Compares two wide-character strings.

Library:LibC
Classification:ANSI
Service:Characters and Strings

Syntax

  #include <wchar.h> 
   
  int  wcscmp (
     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.

See Also