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,17 @@
|
||||
default FORMAT locale: en_US
|
||||
|
||||
== %,.2f of 1234567.891 ==
|
||||
en-US 1,234,567.89
|
||||
de-DE 1.234.567,89
|
||||
fr-FR 1^234^567,89
|
||||
en-IN 1,234,567.89
|
||||
de-CH 1’234’567.89
|
||||
und 1,234,567.89
|
||||
|
||||
== the bug: changing the default locale changes %.2f ==
|
||||
default (en_US) : 1234.50
|
||||
default (de_DE) : 1234,50
|
||||
explicit ROOT : 1234.50
|
||||
|
||||
== not localized: hex, NaN, Infinity ==
|
||||
ff NaN Infinity
|
||||
Reference in New Issue
Block a user