bstring(3B)
NAME
bstring, bcopy, bcmp, bzero − bit and byte string operations
SYNOPSIS
/usr/ucb/cc [ flag ... ] file ...
void bcopy(s1, s2, len)
register char ∗s1, ∗s2;
int len;
int bcmp(s1, s2, len)
register char ∗s1, ∗s2;
int len;
void bzero(sp, len)
register char ∗sp;
int len;
DESCRIPTION
The functions bcopy(), bcmp(), and bzero() operate on variable length strings of bytes. They do not check for null bytes as the routines in string(3C) do.
bcopy() copies len bytes from string s1 to the string s2. Overlapping strings are handled correctly.
bcmp() compares byte string s1 against byte string s2, returning zero if they are identical, 1 otherwise. Both strings are assumed to be len bytes long. bcmp() using len zero bytes always returns zero.
bzero() places len 0 bytes in the string sp.
WARNINGS
The bcmp() and bcopy() routines take parameters backwards from strcmp(3C) and strcpy(3C).
SEE ALSO
NOTES
Use of these interfaces should be restricted to only applications written on BSD platforms. Use of these interfaces with any of the system libraries or in multi-thread applications is unsupported.
SunOS 5.2 — Last change: 09 Feb 1993