Commit | Line | Data |
---|---|---|
7be52b56 KB |
1 | .\" Copyright (c) 1990 The Regents of the University of California. |
2 | .\" All rights reserved. | |
3 | .\" | |
4 | .\" This code is derived from software contributed to Berkeley by | |
5 | .\" Chris Torek. | |
6 | .\" | |
7 | .\" %sccs.include.redist.man% | |
8 | .\" | |
b8dfab23 | 9 | .\" @(#)strcasecmp.3 5.2 (Berkeley) %G% |
7be52b56 KB |
10 | .\" |
11 | .TH STRCASECMP 3 "" | |
12 | .UC 7 | |
13 | .SH NAME | |
14 | strcasecmp \- compare strings, ignoring case | |
15 | .SH SYNOPSIS | |
16 | .nf | |
17 | .ft B | |
18 | #include <string.h> | |
19 | ||
20 | int | |
21 | strcasecmp(const char *s1, const char *s2); | |
b8dfab23 KB |
22 | |
23 | int | |
24 | strncasecmp(const char *s1, const char *s2, size_t len); | |
7be52b56 KB |
25 | .ft R |
26 | .fi | |
27 | .SH DESCRIPTION | |
28 | .B Strcasecmp | |
b8dfab23 KB |
29 | and |
30 | .B strncasecmp | |
31 | compare the null-terminated strings | |
7be52b56 KB |
32 | .I s1 |
33 | and | |
34 | .I s2 | |
b8dfab23 | 35 | and return an integer greater than, equal to, or less than 0, |
7be52b56 KB |
36 | according as |
37 | .I s1 | |
38 | is lexicographically greater than, equal to, or less than | |
39 | .IR s2 | |
40 | after translation of each corresponding character to lower-case. | |
41 | The strings themselves are not modified. | |
42 | The comparison is done using unsigned characters, so that '\e200' | |
43 | is greater than '\e0'. | |
b8dfab23 KB |
44 | .PP |
45 | .B Strncasecmp | |
46 | compares at most | |
47 | .I len | |
48 | characters. | |
7be52b56 | 49 | .SH SEE ALSO |
b8dfab23 | 50 | bcmp(3), memcmp(3), strcmp(3), strcoll(3), strxfrm(3) |