Compares a specified number of characters between two strings.
#include <string.h> int strncmp ( const char *s1, const char *s2, size_t n);
(IN) Points to the string to compare.
(IN) Points to the string to compare.
(IN) Specifies the number of characters to compare.
Returns 0 if the two strings match. Otherwise, returns an integer less than or greater than 0, depending on whether s1 is lexicographically less than or greater than s2.
The strncmp function compares not more than n characters from the string pointed to by s1 to the string pointed to by s2. Characters that follow a NULL character are not compared.