summaryrefslogtreecommitdiff
path: root/source/fitz/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/fitz/string.c')
-rw-r--r--source/fitz/string.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/fitz/string.c b/source/fitz/string.c
index e70ae6e6..4bb3dc9d 100644
--- a/source/fitz/string.c
+++ b/source/fitz/string.c
@@ -22,6 +22,16 @@ fz_strnlen(const char *s, size_t n)
}
int
+fz_strncasecmp(const char *a, const char *b, int n)
+{
+ if (!n--)
+ return 0;
+ for (; *a && *b && n && (*a == *b || fz_tolower(*a) == fz_tolower(*b)); a++, b++, n--)
+ ;
+ return fz_tolower(*a) - fz_tolower(*b);
+}
+
+int
fz_strcasecmp(const char *a, const char *b)
{
while (fz_tolower(*a) == fz_tolower(*b))