1STRCASECMP(P) POSIX Programmer's Manual STRCASECMP(P)
2
3
4
6 strcasecmp, strncasecmp - case-insensitive string comparisons
7
9 #include <strings.h>
10
11 int strcasecmp(const char *s1, const char *s2);
12 int strncasecmp(const char *s1, const char *s2, size_t n);
13
14
16 The strcasecmp() function shall compare, while ignoring differences in
17 case, the string pointed to by s1 to the string pointed to by s2. The
18 strncasecmp() function shall compare, while ignoring differences in
19 case, not more than n bytes from the string pointed to by s1 to the
20 string pointed to by s2.
21
22 In the POSIX locale, strcasecmp() and strncasecmp() shall behave as if
23 the strings had been converted to lowercase and then a byte comparison
24 performed. The results are unspecified in other locales.
25
27 Upon completion, strcasecmp() shall return an integer greater than,
28 equal to, or less than 0, if the string pointed to by s1 is, ignoring
29 case, greater than, equal to, or less than the string pointed to by s2,
30 respectively.
31
32 Upon successful completion, strncasecmp() shall return an integer
33 greater than, equal to, or less than 0, if the possibly null-terminated
34 array pointed to by s1 is, ignoring case, greater than, equal to, or
35 less than the possibly null-terminated array pointed to by s2, respecā
36 tively.
37
39 No errors are defined.
40
41 The following sections are informative.
42
44 None.
45
47 None.
48
50 None.
51
53 None.
54
56 The Base Definitions volume of IEEE Std 1003.1-2001, <strings.h>
57
59 Portions of this text are reprinted and reproduced in electronic form
60 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
61 -- Portable Operating System Interface (POSIX), The Open Group Base
62 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
63 Electrical and Electronics Engineers, Inc and The Open Group. In the
64 event of any discrepancy between this version and the original IEEE and
65 The Open Group Standard, the original IEEE and The Open Group Standard
66 is the referee document. The original Standard can be obtained online
67 at http://www.opengroup.org/unix/online.html .
68
69
70
71IEEE/The Open Group 2003 STRCASECMP(P)