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.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/fitz/string.c b/source/fitz/string.c
index dbcc2c22..a014ce89 100644
--- a/source/fitz/string.c
+++ b/source/fitz/string.c
@@ -14,6 +14,13 @@ fz_tolower(int c)
return c;
}
+size_t
+fz_strnlen(const char *s, size_t n)
+{
+ const char *p = memchr(s, 0, n);
+ return p ? p - s : n;
+}
+
int
fz_strcasecmp(const char *a, const char *b)
{