welibc
A clear, secure, and well documented standard C library
|
Defines the memcmp function. More...
#include <string.h>
Go to the source code of this file.
Functions | |
int | memcmp (const void *s1, const void *s2, size_t n) |
Compares the first n characters of s1 and s2. More... | |
Defines the memcmp function.
Definition in file memcmp.c.
int memcmp | ( | const void * | s1, |
const void * | s2, | ||
size_t | n | ||
) |
Compares the first n characters of s1 and s2.
*s1 | The first object to be compared |
*s2 | The second object to be compared |
n | The number of characters to compare |
The memcmp function compares the first n characters of the object pointed to by s1 to the first n characters of the object pointed to by s2.
>0 | s1 is greater than s2 or no comparison could be made |
0 | s1 is equal to s2 |
<0 | s1 is less than s2 |
Definition at line 68 of file memcmp.c.
Referenced by strcmp(), and strncmp().