2.14.11 strncmp

Declaration:

int strncmp(const char *str1, const char *str2, size_t n);

Compares at most the first n bytes of str1 and str2. Stops comparing after the null character.

Returns zero if the first n bytes (or null terminated length) of str1 and str2 are equal. Returns less than zero or greater than zero if str1 is less than or greater than str2respectively.