summaryrefslogtreecommitdiff
path: root/src/lib/libc/string/strcmp.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc/string/strcmp.3')
-rw-r--r--src/lib/libc/string/strcmp.326
1 files changed, 17 insertions, 9 deletions
diff --git a/src/lib/libc/string/strcmp.3 b/src/lib/libc/string/strcmp.3
index 8b63772bdc..aea2023b7b 100644
--- a/src/lib/libc/string/strcmp.3
+++ b/src/lib/libc/string/strcmp.3
@@ -1,3 +1,5 @@
1.\" $OpenBSD: strcmp.3,v 1.11 2011/07/25 00:38:53 schwarze Exp $
2.\"
1.\" Copyright (c) 1990, 1991 The Regents of the University of California. 3.\" Copyright (c) 1990, 1991 The Regents of the University of California.
2.\" All rights reserved. 4.\" All rights reserved.
3.\" 5.\"
@@ -29,9 +31,7 @@
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE. 32.\" SUCH DAMAGE.
31.\" 33.\"
32.\" $OpenBSD: strcmp.3,v 1.10 2009/12/05 07:45:48 jmc Exp $ 34.Dd $Mdocdate: July 25 2011 $
33.\"
34.Dd $Mdocdate: December 5 2009 $
35.Dt STRCMP 3 35.Dt STRCMP 3
36.Os 36.Os
37.Sh NAME 37.Sh NAME
@@ -53,6 +53,11 @@ functions lexicographically compare the NUL-terminated strings
53.Fa s1 53.Fa s1
54and 54and
55.Fa s2 . 55.Fa s2 .
56The
57.Fn strncmp
58function compares at most
59.Fa len
60characters.
56.Sh RETURN VALUES 61.Sh RETURN VALUES
57The 62The
58.Fn strcmp 63.Fn strcmp
@@ -67,17 +72,13 @@ The comparison is done using unsigned characters, so that
67.Ql \e200 72.Ql \e200
68is greater than 73is greater than
69.Ql \e0 . 74.Ql \e0 .
70.Pp
71.Fn strncmp
72compares at most
73.Fa len
74characters.
75.Sh SEE ALSO 75.Sh SEE ALSO
76.Xr bcmp 3 , 76.Xr bcmp 3 ,
77.Xr memcmp 3 , 77.Xr memcmp 3 ,
78.Xr strcasecmp 3 , 78.Xr strcasecmp 3 ,
79.Xr strcoll 3 , 79.Xr strcoll 3 ,
80.Xr strxfrm 3 80.Xr strxfrm 3 ,
81.Xr wcscmp
81.Sh STANDARDS 82.Sh STANDARDS
82The 83The
83.Fn strcmp 84.Fn strcmp
@@ -85,3 +86,10 @@ and
85.Fn strncmp 86.Fn strncmp
86functions conform to 87functions conform to
87.St -ansiC . 88.St -ansiC .
89.Sh HISTORY
90The
91.Fn strcmp
92and
93.Fn strncmp
94functions first appeared in
95.At v7 .