DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

bstring(S)


bstring: bcopy, bcmp, bzero -- bit and byte string operations

Synopsis

   #include <strings.h>
   

void bcopy(const void *b1, const void *b2, int length);

int bcmp(const void *b1, const void *b2, int length);

void bzero(void *b, int length);

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(S) and string(S) do.

bcopy copies length bytes from string b1 to the string b2. Overlapping strings are handled correctly.

bcmp compares the first length bytes of byte string b1 against byte string b2, returning zero if they are identical, 1 otherwise. Both strings are assumed to be length bytes long. bcmp of length zero bytes always returns zero.

bzero places length 0 bytes in the string b.

References

string(S), string(S)

Notices

The bcmp and bcopy routines take parameters backwards from memcmp and memcpy.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 - 01 June 2005