Bytes.u32.width: def of bend-kit-bytes@0.3.3.0 Import: import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes Lines 783-793 of bend-kit-bytes@0.3.3.0/bytes.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&start_line=783&end_line=793 import Base # The digit count of n, at most 10. def u32.width(f: Nat, small: Bool, +n: U32, +k: U32) -> U32: match f: case 0n: k case 1n+p: match small: case True{}: k case False{}: u32.width(p, U32.is_lt((n / 10 : U32), 10), (n / 10 : U32), (k + 1 : U32)) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.div https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_lt