MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / formatstring

Function formatstring

tools/python-3.11.9-amd64/Lib/calendar.py:643–646  ·  view source on GitHub ↗

Returns a string formatted from n strings, centered within n columns.

(cols, colwidth=_colwidth, spacing=_spacing)

Source from the content-addressed store, hash-verified

641
642
643def formatstring(cols, colwidth=_colwidth, spacing=_spacing):
644 """Returns a string formatted from n strings, centered within n columns."""
645 spacing *= ' '
646 return spacing.join(c.center(colwidth) for c in cols)
647
648
649EPOCH = 1970

Callers 2

formatyearMethod · 0.85
formatFunction · 0.85

Calls 2

joinMethod · 0.45
centerMethod · 0.45

Tested by

no test coverage detected