]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/strcoll.3
getcpu.2, sendfile.2, cmsg.3, rtnetlink.3, arp.7, ddp.7, fifo.7, icmp.7, ip.7, ipv6...
[thirdparty/man-pages.git] / man3 / strcoll.3
CommitLineData
fea681da
MK
1.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2.\"
4b72fb64 3.\" %%%LICENSE_START(verbatim)
fea681da
MK
4.\" Permission is granted to make and distribute verbatim copies of this
5.\" manual provided the copyright notice and this permission notice are
6.\" preserved on all copies.
7.\"
8.\" Permission is granted to copy and distribute modified versions of this
9.\" manual under the conditions for verbatim copying, provided that the
10.\" entire resulting derived work is distributed under the terms of a
11.\" permission notice identical to this one.
c13182ef 12.\"
fea681da
MK
13.\" Since the Linux kernel and libraries are constantly changing, this
14.\" manual page may be incorrect or out-of-date. The author(s) assume no
15.\" responsibility for errors or omissions, or for damages resulting from
16.\" the use of the information contained herein. The author(s) may not
17.\" have taken the same level of care in the production of this manual,
18.\" which is licensed free of charge, as they might when working
19.\" professionally.
c13182ef 20.\"
fea681da
MK
21.\" Formatted or processed versions of this manual, if unaccompanied by
22.\" the source, must acknowledge the copyright and authors of this work.
4b72fb64 23.\" %%%LICENSE_END
fea681da
MK
24.\"
25.\" References consulted:
26.\" Linux libc source code
27.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
28.\" 386BSD man pages
29.\" Modified Sun Jul 25 10:40:44 1993 by Rik Faith (faith@cs.unc.edu)
50831f9b 30.TH STRCOLL 3 2010-09-20 "GNU" "Linux Programmer's Manual"
fea681da
MK
31.SH NAME
32strcoll \- compare two strings using the current locale
33.SH SYNOPSIS
34.nf
35.B #include <string.h>
36.sp
37.BI "int strcoll(const char *" s1 ", const char *" s2 );
38.fi
39.SH DESCRIPTION
60a90ecd
MK
40The
41.BR strcoll ()
42function compares the two strings \fIs1\fP and
1c44bd5b
MK
43\fIs2\fP.
44It returns an integer less than, equal to, or greater
c13182ef 45than zero if \fIs1\fP is found, respectively, to be less than,
1c44bd5b
MK
46to match, or be greater than \fIs2\fP.
47The comparison is based on
c13182ef 48strings interpreted as appropriate for the program's current locale
097585ed 49for category \fBLC_COLLATE\fP. (See
1450e83a 50.BR setlocale (3).)
47297adb 51.SH RETURN VALUE
60a90ecd
MK
52The
53.BR strcoll ()
54function returns an integer less than, equal to,
c13182ef 55or greater than zero if \fIs1\fP is found, respectively, to be less
fea681da
MK
56than, to match, or be greater than \fIs2\fP, when both are interpreted
57as appropriate for the current locale.
47297adb 58.SH CONFORMING TO
1eb85d14 59SVr4, 4.3BSD, C89, C99.
fea681da 60.SH NOTES
60a90ecd
MK
61In the \fI"POSIX"\fP or \fI"C"\fP locales
62.BR strcoll ()
63is equivalent to
64.BR strcmp (3).
47297adb 65.SH SEE ALSO
fea681da
MK
66.BR bcmp (3),
67.BR memcmp (3),
68.BR setlocale (3),
69.BR strcasecmp (3),
70.BR strcmp (3),
3e5c319e 71.BR string (3),
fea681da 72.BR strxfrm (3)