Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

memcmp(9) [netbsd man page]

MEMCMP(9)						   BSD Kernel Developer's Manual						 MEMCMP(9)

NAME
memcmp -- compare byte string SYNOPSIS
#include <sys/systm.h> int memcmp(const void *b1, const void *b2, size_t len); DESCRIPTION
The memcmp() function compares byte string b1 against byte string b2. Both strings are assumed to be len bytes long. RETURN VALUES
The memcmp() function returns zero 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 '', for example). Zero-length strings are always identical. STANDARDS
The memcmp() function conforms to ANSI X3.159-1989 (``ANSI C89''). BSD
July 7, 2001 BSD

Check Out this Related Man Page

BSTRING(3)						   BSD Library Functions Manual 						BSTRING(3)

NAME
memccpy, memchr, memcmp, memcpy, memmem, memmove, memset -- byte string operations LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <string.h> void * memchr(const void *b, int c, size_t len); int memcmp(const void *b1, const void *b2, size_t len); void * memccpy(void *dst, const void *src, int c, size_t len); void * memcpy(void *dst, const void *src, size_t len); void * memmem(const void *block, size_t blen, const void *pat, size_t plen); void * memmove(void *dst, const void *src, size_t len); void * memset(void *b, int c, size_t len); DESCRIPTION
These functions operate on variable length strings of bytes. They do not check for terminating nul bytes as the routines listed in string(3) do. See the specific manual pages for more information. SEE ALSO
memccpy(3), memchr(3), memcmp(3), memcpy(3), memmem(3), memmove(3), memset(3) STANDARDS
The functions memchr(), memcmp(), memcpy(), memmove(), and memset() conform to ANSI X3.159-1989 (``ANSI C89''). HISTORY
The function memccpy() appeared in 4.3BSD. BSD
February 9, 2007 BSD
Man Page