From d8760ab5cf8378fa50e48453149e96a1392253e2 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sun, 15 Sep 2024 19:20:44 +0200 Subject: Shorten the string view type names --- man/u8len.3 | 4 ++-- man/u8next.3 | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'man') diff --git a/man/u8len.3 b/man/u8len.3 index 5b51cd0..886bf6e 100644 --- a/man/u8len.3 +++ b/man/u8len.3 @@ -9,7 +9,7 @@ .Sh SYNOPSIS .In mbstring.h .Ft size_t -.Fn u8len "struct u8view sv" +.Fn u8len "u8view_t sv" .Sh DESCRIPTION The .Fn u8len @@ -32,7 +32,7 @@ will return 22 as a result of use of multibyte-characters in .Fa sv . .Bd -literal -offset indent size_t n; -struct u8view sv = U8(\(dq„Der Große Duden“\(dq); +u8view_t sv = U8(\(dq„Der Große Duden“\(dq); n = u8len(sv); /* 17 */ n = strlen((char *)sv.p); /* 22 */ diff --git a/man/u8next.3 b/man/u8next.3 index 68079f1..d556008 100644 --- a/man/u8next.3 +++ b/man/u8next.3 @@ -10,7 +10,7 @@ .Sh SYNOPSIS .In mbstring.h .Ft int -.Fn u8next "rune *ch" "struct u8view sv" +.Fn u8next "rune *ch" "u8view_t sv" .Ft int .Fn u8prev "rune *ch" "const char8_t **s" "const char8_t *start" .Sh DESCRIPTION @@ -60,7 +60,7 @@ iterate over and print all the codepoints in int w; rune ch; -struct u8view sv = U8("Ta’ Ħaġrat"); +u8view_t sv = U8("Ta’ Ħaġrat"); while (w = u8next(&ch, &sv)) printf("U+%04" PRIXRUNE ": ‘%.*s’\en", ch, w, sv.p - w); @@ -75,7 +75,7 @@ function to iterate backwards. int w; rune ch; -struct u8view sv = U8("Ta’ Ħaġrat"); +u8view_t sv = U8("Ta’ Ħaġrat"); const char8_t *s = sv.p + sv.len; while (w = u8prev(&ch, &s, sv.p)) -- cgit v1.2.3