fmt: make formatting complete and rune-safe

This commit is contained in:
2026-08-09 17:59:41 +09:00
parent 976dc8a813
commit d7d5b593c2
3 changed files with 310 additions and 116 deletions

View File

@@ -34,8 +34,8 @@ Signatures mirror Hare too, modulo:
the two uses don't overlap because `T...` only attaches to a
*param* decl. `lib/fmt` ships both the print family (`print` /
`println` / `fprint` / `fprintln`) and the {n}-placeholder family
(`printf` / `fprintf` / `bsprintf` / `fatalf`); the `%`-parametric
modifier form is parsed but its `*mods` arg slot aborts on dispatch.
(`printf` / `fprintf` / `bsprintf` / `fatalf`), including Hare's
`%`-parametric `*mods` form.
- `(T | U)` sum-typed parameters dispatch via `match` inside the
callee. `strings.byteindex(haystack: str, needle: (str | rune))`,