def boundary.ok

bend-kit-multipart@0.3.0.0 · multipart.bend:187

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

187# 1 to 70 bchars, not ending in a space.
188def boundary.ok(+b: String) -> Bool:
189  +n = Bytes.count(b, 0)
190  Bool.and(Bool.and(U32.is_le(1, n), U32.is_le(n, 70)), Bool.and(bchars(b), Bool.not(String.ends_with(b, " "))))

Uses (8)

Used by (1)