1STRCOLL(3)                 Linux Programmer's Manual                STRCOLL(3)
2
3
4

NAME

6       strcoll - compare two strings using the current locale
7

SYNOPSIS

9       #include <string.h>
10
11       int strcoll(const char *s1, const char *s2);
12

DESCRIPTION

14       The  strcoll() function compares the two strings s1 and s2.  It returns
15       an integer less than, equal to, or greater than zero if  s1  is  found,
16       respectively,  to  be  less than, to match, or be greater than s2.  The
17       comparison is based on strings interpreted as appropriate for the  pro‐
18       gram's current locale for category LC_COLLATE.  (See setlocale(3).)
19

RETURN VALUE

21       The  strcoll()  function  returns  an  integer  less than, equal to, or
22       greater than zero if s1 is found, respectively, to  be  less  than,  to
23       match,  or be greater than s2, when both are interpreted as appropriate
24       for the current locale.
25

ATTRIBUTES

27       For  an  explanation  of  the  terms  used   in   this   section,   see
28       attributes(7).
29
30       ┌──────────┬───────────────┬────────────────┐
31Interface Attribute     Value          
32       ├──────────┼───────────────┼────────────────┤
33strcoll() │ Thread safety │ MT-Safe locale │
34       └──────────┴───────────────┴────────────────┘
35

CONFORMING TO

37       POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD.
38

NOTES

40       In the POSIX or C locales strcoll() is equivalent to strcmp(3).
41

SEE ALSO

43       bcmp(3),  memcmp(3), setlocale(3), strcasecmp(3), strcmp(3), string(3),
44       strxfrm(3)
45

COLOPHON

47       This page is part of release 4.16 of the Linux  man-pages  project.   A
48       description  of  the project, information about reporting bugs, and the
49       latest    version    of    this    page,    can     be     found     at
50       https://www.kernel.org/doc/man-pages/.
51
52
53
54GNU                               2017-09-15                        STRCOLL(3)
Impressum