wcscoll(3C)


wcscoll -- wide character string comparison using collating information

Synopsis

#include <wchar.h>

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

Description

wcscoll is part of the X/Open Portability Guide Issue 4 optional Enhanced Internationalization feature group. It compares the wide character string pointed to by ws1 to the wide character string pointed to by ws2, which are both interpreted as appropriate to the LC_COLLATE category of the current locale.

Return values

wcscoll returns 0 and sets errno to ENOSYS.

Errors

In the following conditions, wcscoll fails and sets errno to:

EINVAL
The ws1 or ws2 arguments contain wide character codes outside the domain of the collating sequence.

ENOSYS
The function is not supported

Usage

Since no return value is reserved to show an error, if you want to check for errors, you should set errno to 0, call wcscoll, and then check errno. If it is non-zero, you can assume that an error has occurred.

Use wcsxfrm and wcscmp for sorting large lists of wide character strings.

References

strcoll(3C), wchar(5), wcscmp(3C), wcsxfrm(3C)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004