aboutsummaryrefslogtreecommitdiff
path: root/lib/unicode/string/u8wnext_human.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/unicode/string/u8wnext_human.c')
-rw-r--r--lib/unicode/string/u8wnext_human.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/unicode/string/u8wnext_human.c b/lib/unicode/string/u8wnext_human.c
index d85abf1..953d942 100644
--- a/lib/unicode/string/u8wnext_human.c
+++ b/lib/unicode/string/u8wnext_human.c
@@ -4,17 +4,16 @@
#include "unicode/string.h"
size_t
-u8wnext_human(struct u8view *dst, const char8_t **s, size_t *n)
+u8wnext_human(struct u8view *dst, struct u8view *sv)
{
- ASSUME(n != nullptr);
- ASSUME(s != nullptr);
- ASSUME(*s != nullptr);
+ ASSUME(sv != nullptr);
+ ASSUME(sv->p != nullptr);
struct u8view w;
- while (u8wnext(&w, s, n)) {
+ while (u8wnext(&w, sv)) {
rune ch;
struct u8view cpy = w;
- while (u8next(&ch, U8_ARGSP(cpy))) {
+ while (u8next(&ch, &cpy)) {
if (uprop_get_gc(ch) & (GC_L | GC_N)) {
if (dst != nullptr)
*dst = w;