@node bcmp, memory @findex bcmp @subheading Syntax @example #include int bcmp(const void *ptr1, const void *ptr2, int length); @end example @subheading Description Compare memory pointed to by @var{ptr1} and @var{ptr2} for at most @var{length} bytes. @subheading Return Value The number of bytes remaining when the first mismatch occurred, or zero if all bytes were equal. @subheading Portability @portability !ansi, !posix @subheading Example @example void f(char *s1, char *s2) @{ int l = bcmp(s1, s2, strlen(s1)); printf("Difference: %s, %s\n", s1+strlen(s1)-l, s2+strlen(s1)-l); @} @end example