def int.text
import yaml-for-bend@0.1.1.0/num.bend as Numimport Base
110# +s+, digits of +base+, as decimal text with the sign. Decimal digits are
111# copied; other bases are converted, in time that grows with the square of
112# their length.
113def int.text(+neg: Bool, +s: String, +base: Nat) -> String:
114 signed(neg, when(String, Nat.is_eq(base, 10n), u => decimal(s), u => big.show(big.read(s, base, []))))