bcmp

Compares, with case sensitivity, two blocks of memory.

Library:LibC
Classification:POSIX (Legacy)
Service:Memory Manipulation

Syntax

  #include <string.h> 
   
  int bcmp (
     const void   *s1,   
     const void   *s2,   
     size_t        length);
  

Parameters

s1

(IN) Points to the first object to compare.

s2

(IN) Points to the second object to compare.

length

(IN) Specifies the number of bytes to compare.

Return Values

Returns 0 if the two strings match. Otherwise, it returns an integer less than or greater than 0, depending on whether s1 is lexicographically less than or greater than s2.

Remarks

The bcmp interface has been implemented as a macro. The memcmp function is the preferred interface.

See Also

memcmp