diff options
author | H. Peter Anvin <hpa@zytor.com> | 2010-03-01 08:54:36 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2010-03-01 08:54:36 -0800 |
commit | f6bd4f6d06b23470c4397c8950177b0810a531dd (patch) | |
tree | 4f7b4fd251d61ebe7c74741a7964d6fb920c754a /core/strcasecmp.c | |
parent | 9ccd44b8acbd3664d5ab25cfec7c6f8c239dd428 (diff) | |
download | syslinux-f6bd4f6d06b23470c4397c8950177b0810a531dd.tar.gz |
Add simplified toupper, tolower, str[n]casecmp to core
(Missing from previous checkin)
Add simplified toupper(), tolower() and str[n]casecmp()
implementations to the core, good enough for ASCII e.g. for use in URL
parsing, or in config file decoding.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'core/strcasecmp.c')
-rw-r--r-- | core/strcasecmp.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/strcasecmp.c b/core/strcasecmp.c new file mode 100644 index 00000000..2f7480d4 --- /dev/null +++ b/core/strcasecmp.c @@ -0,0 +1,11 @@ +/* + * strcasecmp.c + */ + +#include <string.h> +#include <ctype.h> + +int strcasecmp(const char *s1, const char *s2) +{ + return strncasecmp(s1, s2, -1); +} |