GLProgramming.com

home :: about :: development guides :: irc :: forums :: search :: paste :: links :: contribute :: code dump

-> Click here to learn how to get live help <-


Manpage of STRCMP

STRCMP

Index
 

NAME

strcmp, strncmp - compare two strings  

SYNOPSIS

#include <string.h>

int strcmp(const char *s1, const char *s2);

int strncmp(const char *s1, const char *s2, size_t n);
 

DESCRIPTION

The fBstrcmp()fP function compares the two strings fIs1fP and fIs2fP. It returns an integer less than, equal to, or greater than zero if fIs1fP is found, respectively, to be less than, to match, or be greater than fIs2fP.

The fBstrncmp()fP function is similar, except it only compares the first (at most) fInfP characters of fIs1fP and fIs2fP.  

RETURN VALUE

The fBstrcmp()fP and fBstrncmp()fP functions return an integer less than, equal to, or greater than zero if fIs1fP (or the first fInfP bytes thereof) is found, respectively, to be less than, to match, or be greater than fIs2fP.  

CONFORMING TO

SVID 3, POSIX, BSD 4.3, ISO 9899  

SEE ALSO

bcmp(3), memcmp(3), strcasecmp(3), strncasecmp(3), strcoll(3)


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
CONFORMING TO
SEE ALSO