hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 8c8348f4bbf7c7bad8c83e71f45d795215118d2b
parent 46e9bfa85483ad2909801d3e9bb0c932f6ac99ac
Author: Sebastian LaVine <mail@smlavine.com>
Date:   Sun, 24 Dec 2023 14:09:18 -0500

fmt: Fix fmt::mods documentation

With the changes to padding made in d09ea3b72 (2023-11-06), this example
became inaccurate as mods.pad defaults to NUL. This is difficult to
notice on my terminal at least, the NUL-byte is invisible.

Once (if?) @default functionality is added, it might be a good idea to
set the pad field to have a default value of ' '.

Signed-off-by: Sebastian LaVine <mail@smlavine.com>

Diffstat:
Mfmt/README | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fmt/README b/fmt/README @@ -82,7 +82,7 @@ Some parametric modifier examples: // "|hello| world|0000000123|BEEF|" fmt::printf("|{%}|{%}|{%}|{%}|", "hello", &fmt::mods { ... }, - "world", &fmt::mods { width = 10, ... }, + "world", &fmt::mods { pad = ' ', width = 10, ... }, 123, &fmt::mods { prec = 10, ... }, 0xBEEF, &fmt::mods { base = strconv::base::HEX, ... });