summaryrefslogtreecommitdiffstats
path: root/sqwebmail/strcasecmp.c
blob: e9c965914494c61e7754db3de1622fcbbc8d7ece (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include "config.h"
/*
** Copyright 1998 - 1999 Double Precision, Inc.  See COPYING for
** distribution information.
*/


/*
*/
#include	<ctype.h>

int strcasecmp(const char *a, const char *b)
{
	while (*a || *b)
	{
	int	ca=toupper(*a);
	int	cb=toupper(*b);

		if (ca < cb)	return (-1);
		if (ca > cb)	return (1);
		++a;
		++b;
	}
	return (0);
}