strcoll_l(3c) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

strcoll_l(3c)

strcoll(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
       The  strcoll()  and strcoll_l() functions compare the string pointed to
       by s1 to the string pointed to by s2. For strcoll(), both  strings  are
       interpreted  as  appropriate  to the LC_COLLATE category of the current
       locale. For strcoll_l(), both strings are interpreted as appropriate to
       the LC_COLLATE category of the locale represented by locale.


       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.

USAGE
       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.  The  same applies between str‐
       coll_l() and strxfrm_l(3C).

ERRORS
       The strcoll() and strcoll_l() functions 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
       localedef(1),  duplocale(3C),  freelocale(3C),  newlocale(3C),   setlo‐
       cale(3C),   strcmp(3C),   string(3C),   strxfrm(3C),  wcscoll(3C),  wc‐
       sxfrm(3C),  u8_strcmp(3C),  uselocale(3C),  attributes(7),  environ(7),
       standards(7)


       Handling Characters and Character Strings in Internationalizing and Lo‐
       calizing Applications in Oracle Solaris

HISTORY
       The  strcoll_l()  function  was  added to Oracle Solaris in the Solaris
       11.4.0 release.


       The strcoll() function has been included in Solaris since  the  Solaris
       2.0 release.

Oracle Solaris 11.4               28 Feb 2022                      strcoll(3C)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3