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