The strncmp function

Name

strncmp -- 

Synopsis

#include <string.h>

void *strncmp (char *s1, char *s2, size_t n);

Description

The strncmp function compares not more than n characters (characters that follow a null character are not compared) from the array pointed to by s1 to the array pointed to by s2.

Returns

The strncmp function returns an integer greater than, equal to, or less than zero, accordingly as the possibly null-terminated array pointed to by s1 is greater than, equal to, or less than the possibly null-terminated array pointed to by s2.

See Also

The strcmp function

Implementation Notes

None