aboutsummaryrefslogtreecommitdiff
path: root/lib/mbstring/u8split.c
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-05-04 04:36:28 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-05-04 04:44:41 +0200
commit790aaa14406d45dd95dea3f7d6d00da5911c6584 (patch)
treef6e458cc3cde881893c06cba6cee94325c582112 /lib/mbstring/u8split.c
parent8f7f007a52f39c1e03817d417e95877526945b45 (diff)
Replace u8split() with u8cut()
Diffstat (limited to 'lib/mbstring/u8split.c')
-rw-r--r--lib/mbstring/u8split.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/lib/mbstring/u8split.c b/lib/mbstring/u8split.c
deleted file mode 100644
index c26f48b..0000000
--- a/lib/mbstring/u8split.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#include "mbstring.h"
-
-struct u8view
-u8split(struct u8view *rhs, rune ch)
-{
- struct u8view lhs = {.p = rhs->p};
- if ((rhs->p = u8chr(*rhs, ch)) == nullptr) {
- lhs.len = rhs->len;
- rhs->len = 0;
- } else {
- lhs.len = rhs->p - lhs.p;
- rhs->len -= lhs.len;
- u8next(nullptr, rhs);
- }
- return lhs;
-}