memcmp.c

The libc implementation

Author

Martin ‘Solar’ Baute

License

Public Domain

Summary
memcmp.cThe libc implementation
Functions
memcmpCompares n bytes of s1 to n bytes of s2

Functions

memcmp

int memcmp(const void *s1,
const void *s2,
size_t n)

Compares n bytes of s1 to n bytes of s2

Returns positive if the value of s1 is larger than s2

Returns negative if the value of s1 is smaller than s2

Returns zero if s1 equals s2

int memcmp(const void *s1,
const void *s2,
size_t n)
Compares n bytes of s1 to n bytes of s2