wcscoll(), wcscoll_l()

compare two wide character strings using LC_COLLATE 

Function


SYNOPSIS

#include <wchar.h>

int wcscoll(const wchar_t *ws1, const wchar_t *ws2);

#include <locale.h>

int wcscoll_l(const wchar_t *ws1, const wchar_t *ws2, locale_t locale);


DESCRIPTION

The wcscoll() function is used to compare the wide character string pointed to by ws1 to the wide character string pointed to by ws2. This function is identical to the wcscmp() function because LC_COLLATE is unimplemented, hence the locale is always "C".

strxfrm_l() behaves in the same way as strxfrm() 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

ws1 

Is a null-terminated string to compare.

ws2 

Is a null-terminated string to compare.

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 wcscoll() and wcscoll_l() functions return a positive integer if ws1 is greater than ws2, zero if ws1 equals ws2, and a negative integer if ws1 is less than ws2.


CONFORMANCE

wcscoll() conforms to ANSI/ISO 9899:1990 'ISO C90'

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


MULTITHREAD SAFETY LEVEL

MT-Safe, with exceptions.

The function wcscoll() is MT-Safe as long as no thread calls setlocale() while this function is executing.

The function wcscoll_l() is MT-Safe as long as no thread calls freelocale() on locale while this function is executing.


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(), wcsncmp(), wcsncmp_l(), wcsxfrm(), wcsxfrm_l()


PTC MKS Toolkit 10.4 Documentation Build 39.