aboutsummaryrefslogtreecommitdiff
path: root/lib/mbstring/u8haspfx.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mbstring/u8haspfx.c')
-rw-r--r--lib/mbstring/u8haspfx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/mbstring/u8haspfx.c b/lib/mbstring/u8haspfx.c
index b6cea50..c61efbb 100644
--- a/lib/mbstring/u8haspfx.c
+++ b/lib/mbstring/u8haspfx.c
@@ -4,7 +4,7 @@
#include "mbstring.h"
bool
-u8haspfx(const char8_t *s, size_t n, const char8_t *pfx, size_t m)
+u8haspfx(struct u8view sv, struct u8view pfx)
{
- return n >= m && memeq(s, pfx, m);
+ return sv.len >= pfx.len && memeq(sv.p, pfx.p, pfx.len);
}