def pr.len

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

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

276# Length includes its digits, the space, the bounded body and its final newline.
277def pr.len(+available: U32, pax: Pax, r: Bytes.Cursor & Dec) -> Bytes.Cursor & Pst:
278  (c, d) = r
279  Dec{+len, +digits, +stop, +ended, +ok} = d
280  pr.len.valid(ok && Bool.not(ended) && U32.is_eq(stop, 32) && U32.is_ne(digits, 0) && U32.is_lt((digits + 1 : U32), len) && U32.is_le(len, available), c, (len - digits - 2 : U32), pax)

Uses (16)

Used by (1)