Blame lib/c-strcase.h

Packit 8f70b4
/* Case-insensitive string comparison functions in C locale.
Packit 8f70b4
   Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2018 Free Software
Packit 8f70b4
   Foundation, Inc.
Packit 8f70b4
Packit 8f70b4
   This program is free software; you can redistribute it and/or modify
Packit 8f70b4
   it under the terms of the GNU General Public License as published by
Packit 8f70b4
   the Free Software Foundation; either version 3, or (at your option)
Packit 8f70b4
   any later version.
Packit 8f70b4
Packit 8f70b4
   This program is distributed in the hope that it will be useful,
Packit 8f70b4
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 8f70b4
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 8f70b4
   GNU General Public License for more details.
Packit 8f70b4
Packit 8f70b4
   You should have received a copy of the GNU General Public License
Packit 8f70b4
   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
Packit 8f70b4
Packit 8f70b4
#ifndef C_STRCASE_H
Packit 8f70b4
#define C_STRCASE_H
Packit 8f70b4
Packit 8f70b4
#include <stddef.h>
Packit 8f70b4
Packit 8f70b4
Packit 8f70b4
/* The functions defined in this file assume the "C" locale and a character
Packit 8f70b4
   set without diacritics (ASCII-US or EBCDIC-US or something like that).
Packit 8f70b4
   Even if the "C" locale on a particular system is an extension of the ASCII
Packit 8f70b4
   character set (like on BeOS, where it is UTF-8, or on AmigaOS, where it
Packit 8f70b4
   is ISO-8859-1), the functions in this file recognize only the ASCII
Packit 8f70b4
   characters.  More precisely, one of the string arguments must be an ASCII
Packit 8f70b4
   string; the other one can also contain non-ASCII characters (but then
Packit 8f70b4
   the comparison result will be nonzero).  */
Packit 8f70b4
Packit 8f70b4
Packit 8f70b4
#ifdef __cplusplus
Packit 8f70b4
extern "C" {
Packit 8f70b4
#endif
Packit 8f70b4
Packit 8f70b4
Packit 8f70b4
/* Compare strings S1 and S2, ignoring case, returning less than, equal to or
Packit 8f70b4
   greater than zero if S1 is lexicographically less than, equal to or greater
Packit 8f70b4
   than S2.  */
Packit 8f70b4
extern int c_strcasecmp (const char *s1, const char *s2) _GL_ATTRIBUTE_PURE;
Packit 8f70b4
Packit 8f70b4
/* Compare no more than N characters of strings S1 and S2, ignoring case,
Packit 8f70b4
   returning less than, equal to or greater than zero if S1 is
Packit 8f70b4
   lexicographically less than, equal to or greater than S2.  */
Packit 8f70b4
extern int c_strncasecmp (const char *s1, const char *s2, size_t n)
Packit 8f70b4
  _GL_ATTRIBUTE_PURE;
Packit 8f70b4
Packit 8f70b4
Packit 8f70b4
#ifdef __cplusplus
Packit 8f70b4
}
Packit 8f70b4
#endif
Packit 8f70b4
Packit 8f70b4
Packit 8f70b4
#endif /* C_STRCASE_H */