2 * Copyright notice from original mutt:
3 * Copyright (C) 2001 Thomas Roessler <roessler@does-not-exist.org>
5 * This file is part of mutt-ng, see http://www.muttng.org/.
6 * It's licensed under the GNU General Public License,
7 * please see the file GPL in the top level source directory.
11 * Versions of the string comparison functions which are
23 int ascii_isupper (int c)
25 return (c >= 'A') && (c <= 'Z');
28 int ascii_islower (int c)
30 return (c >= 'a') && (c <= 'z');
33 int ascii_toupper (int c)
35 if (ascii_islower (c))
41 int ascii_tolower (int c)
43 if (ascii_isupper (c))
49 int ascii_strcasecmp (const char *a, const char *b)
60 for (; *a || *b; a++, b++) {
61 if ((i = ascii_tolower (*a) - ascii_tolower (*b)))
68 int ascii_strncasecmp (const char *a, const char *b, int n)
79 for (j = 0; (*a || *b) && j < n; a++, b++, j++) {
80 if ((i = ascii_tolower (*a) - ascii_tolower (*b)))