diff options
Diffstat (limited to 'sqwebmail/strcasecmp.c')
| -rw-r--r-- | sqwebmail/strcasecmp.c | 25 | 
1 files changed, 25 insertions, 0 deletions
| diff --git a/sqwebmail/strcasecmp.c b/sqwebmail/strcasecmp.c new file mode 100644 index 0000000..e9c9659 --- /dev/null +++ b/sqwebmail/strcasecmp.c @@ -0,0 +1,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); +} | 
