Compare two strings.

int strncmp(void)

The strncmp() function is similar to strcmp(), except it only compares the first (at most) n characters of s1 and s2.

Returns

The strncmp() function returns an integer less than, equal to, or greater than zero if s1 (or the first n bytes thereof) is found, respectively, to be less than, to match, or be greater than s2.