Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
Standard C Library Functionsbstring(3C)


NAME

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

SYNOPSIS

 
#include <strings.h>
void bcopy(const void *s1, void *s2, size_t n);
 int bcmp(const void *s1, const void *s2, size_t n);
 void bzero(void *s, size_t n);

DESCRIPTION

 

The bcopy(), bcmp(), and bzero() functions operate on variable length strings of bytes. They do not check for null bytes as do the functions described on the string(3C) manual page.

The bcopy() function copies n bytes from string s1 to the string s2. Overlapping strings are handled correctly.

The bcmp() function compares byte string s1 against byte string s2, returning 0 if they are identical, 1 otherwise. Both strings are assumed to be n bytes long. The bcmp() function always returns 0 when n is 0.

The bzero() function places n null bytes in the string s.

WARNINGS

 

The bcmp() and bcopy() routines take parameters backwards from strcmp() and strcpy(), respectively. See string(3C).

ATTRIBUTES

 

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
MT-LevelMT-Safe

SEE ALSO

 

memory(3C), string(3C), attributes(5)


SunOS 5.9Go To TopLast Changed 27 Jun 2000

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.