.\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" This code is derived from software contributed to Berkeley by .\" Chris Torek and the American National Standards Committee X3, .\" on Information Processing Systems. .\" .\" %sccs.include.redist.man% .\" .\" @(#)memcmp.3 8.1 (Berkeley) 06/04/93 .\" .Dd .Dt MEMCMP 3 .Os .Sh NAME .Nm memcmp .Nd compare byte string .Sh SYNOPSIS .Fd #include .Ft int .Fn memcmp "const void *b1" "const void *b2" "size_t len" .Sh DESCRIPTION The .Fn memcmp function compares byte string .Fa b1 against byte string .Fa b2 . Both strings are assumed to be .Fa len bytes long. .Sh RETURN VALUES The .Fn memcmp function returns zero if the the two strings are identical, otherwise returns the difference between the first two differing bytes (treated as unsigned char values, so that .Sq Li \e200 is greater than .Sq Li \&\e0 , for example). Zero-length strings are always identical. .Sh SEE ALSO .Xr bcmp 3 , .Xr strcasecmp 3 , .Xr strcmp 3 , .Xr strcoll 3 , .Xr strxfrm 3 .Sh STANDARDS The .Fn memcmp function conforms to .St -ansiC .