1STRCASECMP(3) Linux Programmer's Manual STRCASECMP(3)
2
3
4
6 strcasecmp, strncasecmp - compare two strings ignoring case
7
9 #include <strings.h>
10
11 int strcasecmp(const char *s1, const char *s2);
12
13 int strncasecmp(const char *s1, const char *s2, size_t n);
14
16 The strcasecmp() function compares the two strings s1 and s2, ignoring
17 the case of the characters. It returns an integer less than, equal to,
18 or greater than zero if s1 is found, respectively, to be less than, to
19 match, or be greater than s2.
20
21 The strncasecmp() function is similar, except it only compares the
22 first n characters of s1.
23
25 The strcasecmp() and strncasecmp() functions return an integer less
26 than, equal to, or greater than zero if s1 (or the first n bytes
27 thereof) is found, respectively, to be less than, to match, or be
28 greater than s2.
29
31 4.4BSD, POSIX.1-2001.
32
34 bcmp(3), memcmp(3), strcmp(3), strcoll(3), strncmp(3), wcscasecmp(3),
35 wcsncasecmp(3)
36
38 This page is part of release 3.25 of the Linux man-pages project. A
39 description of the project, and information about reporting bugs, can
40 be found at http://www.kernel.org/doc/man-pages/.
41
42
43
44 1993-04-11 STRCASECMP(3)