aboutsummaryrefslogtreecommitdiff
path: root/vendor/librune/lib
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/librune/lib')
-rw-r--r--vendor/librune/lib/mbstring/u8cmp.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/vendor/librune/lib/mbstring/u8cmp.c b/vendor/librune/lib/mbstring/u8cmp.c
new file mode 100644
index 0000000..732896c
--- /dev/null
+++ b/vendor/librune/lib/mbstring/u8cmp.c
@@ -0,0 +1,11 @@
+#include <string.h>
+
+#include "mbstring.h"
+
+int
+u8cmp(struct u8view x, struct u8view y)
+{
+ if (x.len != y.len)
+ return x.len > y.len ? +1 : -1;
+ return memcmp(x.p, y.p, x.len);
+}