strncmp(9r) osf1 man page | unix.com

Man Page: strncmp

Operating Environment: osf1

Section: 9r

strncmp(9r)															       strncmp(9r)

NAME
strncmp - General: Compares two strings, using a specified number of characters
SYNOPSIS
int strncmp( char *s1, char *s2, int n );
ARGUMENTS
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.
DESCRIPTION
The strncmp routine compares string s1 to string s2, using the number of characters specified in n.
RETURN VALUES
If string s1 is equal to the null character ( ' ' ), strncmp returns the value 0 (zero). Otherwise, it returns the difference between the number of characters in s1 and s2.
SEE ALSO
Routines: strcmp(9r) strncmp(9r)
Related Man Pages
strncmp(3) - freebsd
strcmp(3) - freebsd
string(3) - v7
strncmp(3) - netbsd
strncasecmp(9f) - sunos
Similar Topics in the Unix Linux Community
Print specific pattern line in c++
Changing the way arguments are read from program
Merge two strings by overlapped region