memcmp()

Compare two blocks of memory.

  #include <string.h>
  
  int memcmp(const void *s1, const void *s2, size_t n);    
Parameter

s1

The memory to compare.

s2

The comparison memory.

n

The maximum length to compare.

Remarks

This function compares the first n characters of s1 to s2, one character at a time.

The function returns a zero if all n characters pointed to by s1 and s2 are equal. The function returns a negative value if the first non-matching character pointed to by s1 is less than the character pointed to by s2. The function returns a positive value if the first non-matching character pointed to by s1 is greater than the character pointed to by s2.

This facility may not be available on some configurations of the EWL.