memcmp()

NAME

memcmp() - compare byte string

SYNOPSIS

#include <string.h>

int memcmp (const void *b1, const void *b2, size_t len)

DESCRIPTION

The memcmp(3) function compares the first len bytes of string b1 against the first len bytes of string b2.

RETURN VALUES

The memcmp(3) function returns 0 if the two strings are identical, otherwise returns the difference between the first two differing bytes (treated as unsigned char values, so that \200 is greater than \0, for example). Zero-length strings are always identical.

SEE ALSO

strcasecmp(3)

strcmp(3)

strcoll(3)

strxfrm(3)