wcscasecmp(), wcscasecmp_l(), wcsncasecmp(), wcsncasecmp_l()

compare two wide character strings, ignoring case 

Function


SYNOPSIS

#include <wchar.h>

int wcscasecmp(const wchar_t *s1, const wchar_t *s2);

int wcsncasecmp(const wchar_t *s1, const wchar_t *s2, size_t n);

#include <wchar.h>

#include <locale.h>

int wcscasecmp_l(const wchar_t *s1, const wchar_t *s2, locale_t locale);

int wcsncasecmp_l(const wchar_t *s1, const wchar_t *s2, size_t n, locale_t locale);


DESCRIPTION

The wcscasecmp() routine does a case-insensitive string comparison (using the current thread or process locale) between the strings referenced by the pointers s1 and s2.

The wcsncasecmp() routine is the same as wcsncasecmp() but stops after n characters.

wcscasecmp_l() and wcsncasecmp_l() behave in the same way as wcscasecmp() and wcsncasecmp() without the _l suffix, but uses the specified locale rather than the global or per-thread locale. A locale_t is returned by newlocale().


PARAMETERS

s1 

Is the null-terminated string to be compared.

s2 

Is the null-terminated string to be compared.

locale 

Is a locale_t perhaps returned by newlocale() or LC_GLOBAL_LOCALE or 0 for the current thread locale set with uselocale().


RETURN VALUES

The function wcscasecmp() class of functions return a positive integer if, disregarding case, string s1 is lexically greater than string s2; zero if, other than case the two strings are identical; and a negative integer if, disregarding case, string s1 is lexically less than string s2.


CONFORMANCE

wcscasecmp() conforms to UNIX 98.

wcsncasecmp() conforms to IEEE Std 1003.1-2008 'POSIX.1'.

wcscasecmp_l() and wcsncasecmp_l() conform to IEEE Std 1003.1-2008 'POSIX.1'.


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
newlocale(), setlocale(), wcscmp(), wcscmp_l(), wcscoll(), wcscoll_l(), wcsncmp(), wcsncmp_l()


PTC MKS Toolkit 10.5 Documentation Build 40.