def u32.digits

bend-kit-bytes@0.3.3.0 · bytes.bend:795

import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
import Base

795def u32.digits(f: Nat, a: Array<U32>, +i: U32, +n: U32) -> Array<U32>:
796  match f:
797    case 0n:
798      a
799    case 1n+p:
800      u32.digits(p, poke(a, i, (48 + n % 10 : U32)), (i - 1 : U32), (n / 10 : U32))

Uses (8)

Used by (1)