diff options
author | Erik Andersen <andersen@codepoet.org> | 2000-05-14 04:16:35 +0000 |
---|---|---|
committer | Erik Andersen <andersen@codepoet.org> | 2000-05-14 04:16:35 +0000 |
commit | 64bc6412188b141c010ac3b8e813b837dd991e80 (patch) | |
tree | ffa12b79ea4b13191754f54b872eb1a4f9e3a04b /libc/string/strcasecmp.c |
Initial revision
Diffstat (limited to 'libc/string/strcasecmp.c')
-rw-r--r-- | libc/string/strcasecmp.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/libc/string/strcasecmp.c b/libc/string/strcasecmp.c new file mode 100644 index 000000000..0e7b0388f --- /dev/null +++ b/libc/string/strcasecmp.c @@ -0,0 +1,26 @@ +/* Copyright (C) 1995,1996 Robert de Bath <rdebath@cix.compulink.co.uk> + * This file is part of the Linux-8086 C library and is distributed + * under the GNU Library General Public License. + */ + +#include <string.h> +#include <ctype.h> + +int +strcasecmp(s, d) +char *s; +char *d; +{ + for(;;) + { + if( *s != *d ) + { + if( tolower(*s) != tolower(*d) ) + return *s - *d; + } + else if( *s == '\0' ) break; + s++; d++; + } + return 0; +} + |