Add width placeholder specifier

This commit is contained in:
Sangeeth Sudheer 2024-05-01 20:16:16 +05:30
parent 18da65a933
commit 7fc76bdb93
Signed by: x
GPG Key ID: F6D06ECE734C57D1

View File

@ -33,4 +33,5 @@ func Formatting() {
f("go num width (left align): |%-5d|\n", 2) f("go num width (left align): |%-5d|\n", 2)
f("go float precision (left align): |%-5.2f|\n", 3.141516) f("go float precision (left align): |%-5.2f|\n", 3.141516)
f("go char: %c\n", 97) f("go char: %c\n", 97)
f("go custom width specifier: |%*s|\n", 5, "foo")
} }