1*63eb84d1Schristos /* Case-insensitive string comparison functions in C locale. 2*63eb84d1Schristos Copyright (C) 1995-1996, 2001, 2003, 2005 Free Software Foundation, Inc. 3*63eb84d1Schristos 4*63eb84d1Schristos This program is free software; you can redistribute it and/or modify 5*63eb84d1Schristos it under the terms of the GNU General Public License as published by 6*63eb84d1Schristos the Free Software Foundation; either version 2, or (at your option) 7*63eb84d1Schristos any later version. 8*63eb84d1Schristos 9*63eb84d1Schristos This program is distributed in the hope that it will be useful, 10*63eb84d1Schristos but WITHOUT ANY WARRANTY; without even the implied warranty of 11*63eb84d1Schristos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12*63eb84d1Schristos GNU General Public License for more details. 13*63eb84d1Schristos 14*63eb84d1Schristos You should have received a copy of the GNU General Public License 15*63eb84d1Schristos along with this program; if not, write to the Free Software Foundation, 16*63eb84d1Schristos Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ 17*63eb84d1Schristos 18*63eb84d1Schristos #ifndef C_STRCASE_H 19*63eb84d1Schristos #define C_STRCASE_H 20*63eb84d1Schristos 21*63eb84d1Schristos #include <stddef.h> 22*63eb84d1Schristos 23*63eb84d1Schristos 24*63eb84d1Schristos /* The functions defined in this file assume the "C" locale and a character 25*63eb84d1Schristos set without diacritics (ASCII-US or EBCDIC-US or something like that). 26*63eb84d1Schristos Even if the "C" locale on a particular system is an extension of the ASCII 27*63eb84d1Schristos character set (like on BeOS, where it is UTF-8, or on AmigaOS, where it 28*63eb84d1Schristos is ISO-8859-1), the functions in this file recognize only the ASCII 29*63eb84d1Schristos characters. More precisely, one of the string arguments must be an ASCII 30*63eb84d1Schristos string; the other one can also contain non-ASCII characters (but then 31*63eb84d1Schristos the comparison result will be nonzero). */ 32*63eb84d1Schristos 33*63eb84d1Schristos 34*63eb84d1Schristos #ifdef __cplusplus 35*63eb84d1Schristos extern "C" { 36*63eb84d1Schristos #endif 37*63eb84d1Schristos 38*63eb84d1Schristos 39*63eb84d1Schristos /* Compare strings S1 and S2, ignoring case, returning less than, equal to or 40*63eb84d1Schristos greater than zero if S1 is lexicographically less than, equal to or greater 41*63eb84d1Schristos than S2. */ 42*63eb84d1Schristos extern int c_strcasecmp (const char *s1, const char *s2); 43*63eb84d1Schristos 44*63eb84d1Schristos /* Compare no more than N characters of strings S1 and S2, ignoring case, 45*63eb84d1Schristos returning less than, equal to or greater than zero if S1 is 46*63eb84d1Schristos lexicographically less than, equal to or greater than S2. */ 47*63eb84d1Schristos extern int c_strncasecmp (const char *s1, const char *s2, size_t n); 48*63eb84d1Schristos 49*63eb84d1Schristos 50*63eb84d1Schristos #ifdef __cplusplus 51*63eb84d1Schristos } 52*63eb84d1Schristos #endif 53*63eb84d1Schristos 54*63eb84d1Schristos 55*63eb84d1Schristos #endif /* C_STRCASE_H */ 56