strncmp - General: Compares two strings, using a specified
number of characters
int strncmp(
char *s1,
char *s2,
int n );
Specifies a pointer to a string (an array of characters
terminated by a null character). Specifies a pointer to a
string (an array of characters terminated by a null character).
Specifies the number of bytes to be compared.
The strncmp routine compares string s1 to string s2, using
the number of characters specified in n.
If string s1 is equal to the null character ( '\0 ' ),
strncmp returns the value 0 (zero). Otherwise, it returns
the difference between the number of characters in s1 and
s2.
Routines: strcmp(9r)
strncmp(9r)
[ Back ] |