Blame lib/c-strcase.h

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