Spec syntax
Everything after the : in a replacement field is one small grammar. Learn it once and it applies to
Alignment and width
Width and alignment are what turn a stream of values into a readable table, and the defaults differ
Sign and precision
Sign and precision are where formatted numbers stop being an aesthetic choice and start being a
Presentation types
The final character of a spec picks a presentation, and the legal set of characters depends on the
Locales
fmt is locale-independent by default, and that is a feature, not an oversight — you opt in to