xref: /original-bsd/lib/libc/string/bcmp.3 (revision 7bad34b3)
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.\"     @(#)bcmp.3	5.4 (Berkeley) 04/19/91
9.\"
10.Dd
11.Dt BCMP 3
12.Os BSD 4.2
13.Sh NAME
14.Nm bcmp
15.Nd compare byte string
16.Sh SYNOPSIS
17.Fd #include <string.h>
18.Ft int
19.Fn bcmp "const void *b1" "const void *b2" "size_t len"
20.Sh DESCRIPTION
21The
22.Fn bcmp
23function
24compares byte string
25.Fa b1
26against byte string
27.Fa b2 ,
28returning zero if they are identical, non-zero otherwise.
29Both strings are assumed to be
30.Fa len
31bytes long.
32Zero-length strings are always identical.
33.Pp
34The strings may overlap.
35.Sh SEE ALSO
36.Xr bcmp 3 ,
37.Xr memcmp 3 ,
38.Xr strcasecmp 3 ,
39.Xr strcmp 3 ,
40.Xr strcoll 3 ,
41.Xr strxfrm 3
42.Sh HISTORY
43A
44.Fn bcmp
45function first appeared in
46.Bx 4.2 .
47