Blame gl/c-strcase.h

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