| 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 | .\" |
| 9 | .\" @(#)strncasecmp.3 5.1 (Berkeley) %G% |
| 10 | .\" |
| 11 | .TH STRCASECMP 3 "" |
| 12 | .UC 7 |
| 13 | .SH NAME |
| 14 | strncasecmp \- 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); |
| 22 | |
| 23 | int |
| 24 | strncasecmp(const char *s1, const char *s2, size_t len); |
| 25 | .ft R |
| 26 | .fi |
| 27 | .SH DESCRIPTION |
| 28 | .B Strcasecmp |
| 29 | compares null-terminated strings |
| 30 | .I s1 |
| 31 | and |
| 32 | .I s2 |
| 33 | and returns an integer greater than, equal to, or less than 0, |
| 34 | according as |
| 35 | .I s1 |
| 36 | is lexicographically greater than, equal to, or less than |
| 37 | .IR s2 |
| 38 | after translation of each corresponding character to lower-case. |
| 39 | The strings themselves are not modified. |
| 40 | The comparison is done using unsigned characters, so that '\e200' |
| 41 | is greater than '\e0'. |
| 42 | .PP |
| 43 | .B Strncasecmp |
| 44 | compares at most |
| 45 | .I len |
| 46 | characters. |
| 47 | .SH SEE ALSO |
| 48 | bcmp(3), memcmp(3), strcasecmp(3), strcmp(3), strcoll(3) |
| 49 | strncmp(3), strxfrm(3) |