summaryrefslogtreecommitdiffstats
path: root/pbl/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'pbl/string.c')
-rw-r--r--pbl/string.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/pbl/string.c b/pbl/string.c
index e6c0997ebc..e96eb99fc2 100644
--- a/pbl/string.c
+++ b/pbl/string.c
@@ -7,6 +7,7 @@
#include <linux/types.h>
#include <linux/string.h>
#include <linux/compiler.h>
+#include <linux/ctype.h>
void *memcpy(void *__dest, __const void *__src, size_t __n)
{
@@ -98,6 +99,17 @@ int strcmp(const char *cs, const char *ct)
return res;
}
+int strcasecmp(const char *s1, const char *s2)
+{
+ int c1, c2;
+
+ do {
+ c1 = tolower(*s1++);
+ c2 = tolower(*s2++);
+ } while (c1 == c2 && c1 != 0);
+ return c1 - c2;
+}
+
void *memchr(const void *s, int c, size_t count)
{
const unsigned char *p = s;