bcmp

Compares byte strings.

Format

#include  <strings.h>

void bcmp  (const void *string1, const void
           *string2, size_t length);

Arguments

string1, string2
The byte strings to be compared.
length
The length (in bytes) of the strings.

Description

The bcmp function compares the byte string in string1 against the byte string in string2.

Unlike the string functions, there is no checking for null bytes. Zero-length strings are always identical.

Note that bcmp is equivalent to memcmp, which is defined by the ANSI C Standard. Therefore, using memcmp is recommended for portable programs.

Return Values
The strings are identical. 
Nonzero  The strings are not identical. 


Previous Page | Next Page | Table of Contents | Index