svcadm(8)을 검색하려면 섹션에서 8 을 선택하고, 맨 페이지 이름에 svcadm을 입력하고 검색을 누른다.
strcoll_l(3c)
Standard C Library Functions strcoll(3C)
NAME
strcoll, strcoll_l - string collation
SYNOPSIS
#include <string.h>
int strcoll(const char *s1, const char *s2);
int strcoll_l(const char *s1, const char *s2, locale_t locale);
DESCRIPTION
Both strcoll() and strxfrm(3C) provide for locale-specific string sort‐
ing. strcoll() is intended for applications in which the number of com‐
parisons per string is small. When strings are to be compared a number
of times, strxfrm(3C) is a more appropriate function because the trans‐
formation process occurs only once. Same applies between strcoll_l()
and strxfrm_l(3C).
The strcoll() and strcoll_l() functions compare the string pointed to
by s1 to the string pointed to by s2, both interpreted as appropriate
to the LC_COLLATE category of the current locale, or of the locale rep‐
resented by locale, respectively.
The strcoll() and strcoll_l() functions do not change the setting of
errno if successful.
Since no return value is reserved to indicate an error, an application
wishing to check for error situations should set errno to 0, then call
strcoll() or strcoll_l(), then check errno.
The behavior is undefined if the <locale> argument to strcoll_l() is
the special locale object LC_GLOBAL_LOCALE or is not a valid locale
object handle.
RETURN VALUES
Upon successful completion, strcoll() and strcoll_l() return an integer
greater than, equal to, or less than zero in direct correlation to
whether string s1 is greater than, equal to, or less than the string
s2. The comparison is based on strings interpreted as appropriate to
the current locale or locale represented by locale respectively, for
category LC_COLLATE (see setlocale(3C)).
On error, strcoll() and strcoll_l() may set errno, but no return value
is reserved to indicate an error.
ERRORS
The strcoll() and strcoll_l() function may fail if:
EINVAL The s1 or s2 arguments contain characters outside the domain
of the collating sequence.
FILES
/usr/lib/locale/locale/locale.so.*
LC_COLLATE database for locale
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 standards(7).
SEE ALSO
wsxfrm(3C), localedef(1), duplocale(3C), freelocale(3C), newlocale(3C),
setlocale(3C), string(3C), strxfrm(3C), uselocale(3C), attributes(7),
environ(7), standards(7)
Oracle Solaris 11.4 10 Oct 2014 strcoll(3C)