def pct_text

cswap-bend-cli@0.1.0.0 · tui/fmt.bend:59

import cswap-bend-cli@0.1.0.0/tui/fmt.bend as Fmt
import Base

59# " 47%" (width 4), as the reference's `{pct:3.0f}%`.
60def pct_text(+c: U32) -> String:
61  pad_left(U32.show(round_even(c)), 3n) ++ "%"

Uses (6)

Used by (1)