memcmp() - compare byte string
#include <string.h>
int memcmp (const void *b1, const void *b2, size_t len)
The memcmp(3) function compares the first len bytes of string b1 against the first len bytes of string b2.
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.
strcasecmp(3)
strcmp(3)
strcoll(3)
strxfrm(3)