]>
Commit | Line | Data |
---|---|---|
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 |
32 | strcoll \- 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 |
40 | The |
41 | .BR strcoll () | |
42 | function compares the two strings \fIs1\fP and | |
1c44bd5b MK |
43 | \fIs2\fP. |
44 | It returns an integer less than, equal to, or greater | |
c13182ef | 45 | than zero if \fIs1\fP is found, respectively, to be less than, |
1c44bd5b MK |
46 | to match, or be greater than \fIs2\fP. |
47 | The comparison is based on | |
c13182ef | 48 | strings interpreted as appropriate for the program's current locale |
097585ed | 49 | for category \fBLC_COLLATE\fP. (See |
1450e83a | 50 | .BR setlocale (3).) |
47297adb | 51 | .SH RETURN VALUE |
60a90ecd MK |
52 | The |
53 | .BR strcoll () | |
54 | function returns an integer less than, equal to, | |
c13182ef | 55 | or greater than zero if \fIs1\fP is found, respectively, to be less |
fea681da MK |
56 | than, to match, or be greater than \fIs2\fP, when both are interpreted |
57 | as appropriate for the current locale. | |
47297adb | 58 | .SH CONFORMING TO |
1eb85d14 | 59 | SVr4, 4.3BSD, C89, C99. |
fea681da | 60 | .SH NOTES |
60a90ecd MK |
61 | In the \fI"POSIX"\fP or \fI"C"\fP locales |
62 | .BR strcoll () | |
63 | is 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) |