svcadm(8)을 검색하려면 섹션에서 8 을 선택하고, 맨 페이지 이름에 svcadm을 입력하고 검색을 누른다.
wcscoll(3c)
wcscoll(3C) Standard C Library Functions wcscoll(3C)
NAME
wcscoll, wcscoll_l, wscoll - wide character string comparison using
collating information
SYNOPSIS
#include <wchar.h>
int wcscoll(const wchar_t *ws1, const wchar_t *ws2);
int wcscoll_l(const wchar_t *ws1, const wchar_t *ws2 locale_t locale);
#include <widec.h>
int wscoll(const wchar_t *ws1, const wchar_t *ws2);
DESCRIPTION
The wcscoll() and wscoll() functions compare the wide character string
pointed to by ws1 to the wide character string pointed to by ws2, both
interpreted as appropriate to the LC_COLLATE category of the current
locale.
The wcscoll_l() function is equivalent to the wcscoll() function, ex‐
cept that the locale data used is from the locale represented by lo‐
cale.
The behavior is undefined if the locale argument to wcscoll_l() is the
special locale object LC_GLOBAL_LOCALE or is not a valid locale object
handle.
The wcscoll(), wcscoll_l(), and wscoll() functions do not change the
setting of errno if successful.
An application wanting to check for error situations should set errno
to 0 before calling wcscoll(), wcscoll_l(), or wscoll(). If errno is
non-zero on return, an error has occurred.
RETURN VALUES
Upon successful completion, wcscoll(), wcscoll_l(), and wscoll() return
an integer greater than, equal to, or less than 0, depending upon
whether the wide character string pointed to by ws1 is greater than,
equal to, or less than the wide character string pointed to by ws2,
when both are interpreted as appropriate to the current locale.
On error, wcscoll(), wcscoll_l(), and wscoll() may set errno, but no
return value is reserved to indicate an error.
ERRORS
These functions may fail if:
EINVAL The ws1 or ws2 arguments contain wide character codes outside
the domain of the collating sequence.
USAGE
The wcsxfrm(3C) and wcscmp(3C) functions should be used for sorting
large lists.
The functions provided in <widec.h> (those with names starting with
just "w" instead of "wc") are provided for backwards compatibility, and
are not recommended for use in newer code. Instead, the equivalent
functions from <wchar.h> should be used for greater portability to
other systems. Specifically wcscoll() should be used in preference to
wscoll().
ATTRIBUTES
See attributes(7) for descriptions of the following attributes:
tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
TRIBUTE VALUE _ CSIEnabled _ Interface StabilityCommitted _ MT-LevelMT-
Safe _ StandardSee below
Standard
See standards(7) for descriptions of the following standards:
tab() box; cw(2.06i) |cw(3.44i) lw(2.06i) |lw(3.44i) INTERFACESAPPLICA‐
BLE STANDARDS _ wcscoll()T{
C95 through C11,
POSIX.1-2001 through 2008,
SUS through SUSv4,
XPG4 through XPG7
T} _ wcscoll_l()T{
POSIX.1-2008,
SUSv4,
XPG7
T} _ wscoll()T{
None
T}
SEE ALSO
duplocale(3C), freelocale(3C), newlocale(3C), setlocale(3C), uselo‐
cale(3C), wcscmp(3C), wcsxfrm(3C), attributes(7), standards(7)
Handling Characters and Character Strings in Internationalizing and Lo‐
calizing Applications in Oracle Solaris
HISTORY
The wcscoll_l() function was added to Oracle Solaris in the Solaris
11.4.0 release.
The wcscoll() function was added to Solaris in the Solaris 2.4 release.
The wscoll() function has been included in Solaris since the Solaris
2.0 release.
Oracle Solaris 11.4 25 Nov 2024 wcscoll(3C)