def pr.record

bend-kit-tar@0.3.0.0 · tar.bend:631

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

631# "<len> path=<name>\n".
632def pr.record(nb: Array<U32>, +nl: U32) -> Array<U32> & Bytes.Bytes:
633  +l = rec.len(nl)
634  +d = digits(l)
635  o = Bytes.poke(put.str(" path=", dec.put(U32.to_nat(d), Bytes.alloc(l), (d - 1 : U32), l), d), (l - 1 : U32), 10)
636  rec.fin(l, Bytes.copy(nl, nb, o, 0, (d + 6 : U32)))

Uses (15)

Used by (1)