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.315
1 files changed, 6 insertions, 9 deletions
diff --git a/src/lib/libc/string/strcmp.3 b/src/lib/libc/string/strcmp.3
index fecaa85410..c1173a423a 100644
--- a/src/lib/libc/string/strcmp.3
+++ b/src/lib/libc/string/strcmp.3
@@ -33,14 +33,14 @@
33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34.\" SUCH DAMAGE. 34.\" SUCH DAMAGE.
35.\" 35.\"
36.\" from: @(#)strcmp.3 5.6 (Berkeley) 6/29/91 36.\" $OpenBSD: strcmp.3,v 1.5 2000/04/21 15:24:19 aaron Exp $
37.\" $Id: strcmp.3,v 1.1.1.1 1995/10/18 08:42:22 deraadt Exp $
38.\" 37.\"
39.Dd June 29, 1991 38.Dd June 29, 1991
40.Dt STRCMP 3 39.Dt STRCMP 3
41.Os 40.Os
42.Sh NAME 41.Sh NAME
43.Nm strcmp 42.Nm strcmp ,
43.Nm strncmp
44.Nd compare strings 44.Nd compare strings
45.Sh SYNOPSIS 45.Sh SYNOPSIS
46.Fd #include <string.h> 46.Fd #include <string.h>
@@ -53,8 +53,7 @@ The
53.Fn strcmp 53.Fn strcmp
54and 54and
55.Fn strncmp 55.Fn strncmp
56functions 56functions lexicographically compare the null-terminated strings
57lexicographically compare the null-terminated strings
58.Fa s1 57.Fa s1
59and 58and
60.Fa s2 . 59.Fa s2 .
@@ -73,9 +72,8 @@ The comparison is done using unsigned characters, so that
73is greater than 72is greater than
74.Ql \e0 . 73.Ql \e0 .
75.Pp 74.Pp
76The
77.Fn strncmp 75.Fn strncmp
78compares not more than 76compares at most
79.Fa len 77.Fa len
80characters. 78characters.
81.Sh SEE ALSO 79.Sh SEE ALSO
@@ -89,6 +87,5 @@ The
89.Fn strcmp 87.Fn strcmp
90and 88and
91.Fn strncmp 89.Fn strncmp
92functions 90functions conform to
93conform to
94.St -ansiC . 91.St -ansiC .