![]() -> Click here to learn how to get live help <- |
STRCMPIndexNAMEstrcmp, strncmp - compare two stringsSYNOPSIS#include <string.h> int strcmp(const char *s1, const char *s2); int strncmp(const char *s1, const char *s2, size_t n); DESCRIPTIONThe 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 VALUEThe 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 TOSVID 3, POSIX, BSD 4.3, ISO 9899SEE ALSObcmp(3), memcmp(3), strcasecmp(3), strncasecmp(3), strcoll(3)
Index |