From 6648dc9ed188a99ca7f22a5fbd53d35440f2beff Mon Sep 17 00:00:00 2001 From: Josh Date: Fri, 12 Jun 2020 18:05:40 -0400 Subject: [PATCH] use width in when printing formatted string to control padding added after the string --- core/fmt/fmt.odin | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/fmt/fmt.odin b/core/fmt/fmt.odin index 31eaa965d..d9f379da0 100644 --- a/core/fmt/fmt.odin +++ b/core/fmt/fmt.odin @@ -898,6 +898,11 @@ fmt_string :: proc(fi: ^Info, s: string, verb: rune) { switch verb { case 's', 'v': strings.write_string(fi.buf, s); + if fi.width_set && len(s) < fi.width { + for i in 0..