diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-05-04 04:01:45 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-05-04 04:01:45 +0200 |
commit | ac1b4bcbaeaee7d2ef9132dcdc254f2d08691650 (patch) | |
tree | 90250966629653f0462cf17bc0b6f2476fb6d1fc /lib/mbstring/u8cmp.c | |
parent | 8b923ba5e5bb37ea26350b4c1c688b8697706609 (diff) |
Go all in on string views, and fix manuals
Diffstat (limited to 'lib/mbstring/u8cmp.c')
-rw-r--r-- | lib/mbstring/u8cmp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/mbstring/u8cmp.c b/lib/mbstring/u8cmp.c index 8bd2400..0059020 100644 --- a/lib/mbstring/u8cmp.c +++ b/lib/mbstring/u8cmp.c @@ -3,7 +3,7 @@ #include "mbstring.h" int -u8cmp(const char8_t *x, size_t n, const char8_t *y, size_t m) +u8cmp(struct u8view x, struct u8view y) { - return n != m ? (n > m ? +1 : -1) : memcmp(x, y, n); + return x.len != y.len ? (x.len > y.len ? +1 : -1) : memcmp(x.p, y.p, x.len); } |