]> git.saurik.com Git - apple/libc.git/blob - string/FreeBSD/strcoll.3.patch
Libc-498.1.1.tar.gz
[apple/libc.git] / string / FreeBSD / strcoll.3.patch
1 --- _SB/Libc/string/FreeBSD/strcoll.3 2003-05-20 15:23:54.000000000 -0700
2 +++ _SB/Libc/string/FreeBSD/strcoll.3.edit 2006-06-28 16:55:53.000000000 -0700
3 @@ -40,14 +40,26 @@
4 .Dt STRCOLL 3
5 .Os
6 .Sh NAME
7 -.Nm strcoll
8 -.Nd compare strings according to current collation
9 +.Nm strcoll ,
10 +.Nm strcoll_l
11 +.Nd compare strings, according to current collation
12 .Sh LIBRARY
13 .Lb libc
14 .Sh SYNOPSIS
15 .In string.h
16 .Ft int
17 -.Fn strcoll "const char *s1" "const char *s2"
18 +.Fo strcoll
19 +.Fa "const char *s1"
20 +.Fa "const char *s2"
21 +.Fc
22 +.In string.h
23 +.In xlocale.h
24 +.Ft int
25 +.Fo strcoll_l
26 +.Fa "const char *s1"
27 +.Fa "const char *s2"
28 +.Fa "locale_t loc"
29 +.Fc
30 .Sh DESCRIPTION
31 The
32 .Fn strcoll
33 @@ -55,19 +67,29 @@
34 lexicographically compares the null-terminated strings
35 .Fa s1
36 and
37 -.Fa s2
38 -according to the current locale collation if any, otherwise call
39 -.Fa strcmp ,
40 +.Fa s2 ,
41 +according to the current locale collation, if any.
42 +Otherwise, it calls
43 +.Fa strcmp
44 and returns an integer greater than, equal to, or less than 0,
45 according as
46 .Fa s1
47 is greater than, equal to, or less than
48 .Fa s2 .
49 +.Pp
50 +Although the
51 +.Fn strcoll
52 +function uses the current locale, the
53 +.Fn strcoll_l
54 +function may be passed a locale directly. See
55 +.Xr xlocale 3
56 +for more information.
57 .Sh SEE ALSO
58 .Xr setlocale 3 ,
59 .Xr strcmp 3 ,
60 .Xr strxfrm 3 ,
61 -.Xr wcscoll 3
62 +.Xr wcscoll 3 ,
63 +.Xr xlocale 3
64 .Sh STANDARDS
65 The
66 .Fn strcoll