string-format: String.format/formatted/printf cheat sheet module (specifier anatomy, rounding vs C printf, locales, Indian lakh/crore grouping Formatter cannot do, format exceptions, %t dates, concat cost), 11 contract tests
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b7Sr2zcoRD2watXv1G
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
Item Qty Price Total
|
||||
------------------------------------------------
|
||||
Notebook 12 45.50 546.00
|
||||
Pen (box of 10) 3 120.00 360.00
|
||||
Stapler 1 350.00 350.00
|
||||
------------------------------------------------
|
||||
Grand total 1,256.00
|
||||
|
||||
== the same table with printf: it prints, it does not return a String ==
|
||||
Notebook | 12|
|
||||
|
||||
== truncation: %.Ns cuts, width pads ==
|
||||
[Pen (b ] [ Pen (b]
|
||||
Reference in New Issue
Block a user