diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-09-15 19:20:44 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-09-15 19:20:44 +0200 |
commit | d8760ab5cf8378fa50e48453149e96a1392253e2 (patch) | |
tree | 3ee857325aefe46070d21c0339feee068987222a /man | |
parent | b6792f703c715ccfc0854c4e8ee3ca703565f4eb (diff) |
Shorten the string view type names
Diffstat (limited to 'man')
-rw-r--r-- | man/u8len.3 | 4 | ||||
-rw-r--r-- | man/u8next.3 | 6 |
2 files changed, 5 insertions, 5 deletions
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)) |