Name

wcsicoll - wide-character string comparison using collating information

Library

libc.lib

Synopsis

  #include <wchar.h>
  int wcsicoll (const wchar_t *s1, const wchar_t *s2);

Return values

The wcsicoll function returns an integer greater than, equal to, or less than 0, if s1 is greater than, equal to, or less than s2.

No return value is reserved to indicate errors; callers should set errno to 0 before calling wcsicoll. If it is non-zero upon return from wcsicoll, an error has occurred.


Detailed description

The wcsicoll function compares the null-terminated strings s1 and s2 according to the current locale collation order, by ignoring the case. In the "C" locale, wcsicoll is equivalent to wcsicmp.

Examples

#include <wchar.h>
/* Illustrates how to use wcsicoll API */
int example_wcsicoll (void)
{  
        /* compares the two strings */
  if( wcsicoll(L"abcdef",L"abcdeg") != L’f’-L’g’)  
   return -1;
 return 0;
}

         


Errors

The wcsicoll function will fail if:
[EILSEQ]
  An invalid wide character code was specified.
[ENOMEM]
  Cannot allocate enough memory for temporary buffers.

Limitations

The current implementation of wcsicoll is not affected by the LC_CTYPE category of the current locale. It is equivalent to wcsicmp in this implementation.

See also

setlocale, strcoll, wcsicmp, wcsxfrm

Bugs

The current implementation of wcsicoll only works in single-byte LC_CTYPE locales, and falls back to using wcsicmp in locales with extended character sets.

Feedback

For additional information or queries on this page send feedback

© 2005-2007 Nokia

Top