xref: /original-bsd/lib/libc/string/strcoll.3 (revision 963f8367)
1.\" Copyright (c) 1990, 1991 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" This code is derived from software contributed to Berkeley by
5.\" Chris Torek.
6.\" %sccs.include.redist.man%
7.\"
8.\"     @(#)strcoll.3	5.5 (Berkeley) 04/19/91
9.\"
10.Dd
11.Dt STRCOLL 3
12.Os
13.Sh NAME
14.Nm strcoll
15.Nd compare strings according to current collation
16.Sh SYNOPSIS
17.Fd #include <string.h>
18.Ft int
19.Fn strcoll "const char *s1" "const char *s2"
20.Sh DESCRIPTION
21The
22.Fn strcoll
23function
24lexicographically compares the null-terminated strings
25.Fa s1
26and
27.Fa s2
28according to the current locale collation
29and returns an integer greater than, equal to, or less than 0,
30according as
31.Fa s1
32is greater than, equal to, or less than
33.Fa s2 .
34.Sh SEE ALSO
35.Xr bcmp 3 ,
36.Xr memcmp 3 ,
37.Xr setlocale 3 ,
38.Xr strcasecmp 3 ,
39.Xr strcmp 3 ,
40.Xr strxfrm 3
41.Sh STANDARDS
42The
43.Fn strcoll
44function
45conforms to
46.St -ansiC .
47