Blame lib/c-strcase.h

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