Back to index

glibc  2.9
Functions
wcscmp.c File Reference
#include <wchar.h>

Go to the source code of this file.

Functions

int wcscmp (wchar_t *s1, const wchar_t *s2) const

Function Documentation

int wcscmp ( wchar_t *  s1,
const wchar_t *  s2 
) const

Definition at line 27 of file wcscmp.c.

{
  wint_t c1, c2;

  do
    {
      c1 = (wint_t) *s1++;
      c2 = (wint_t) *s2++;
      if (c1 == L'\0')
       return c1 - c2;
    }
  while (c1 == c2);

  return c1 - c2;
}