def suffix.dash

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

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

375# What follows a delimiter match (RFC 2046 §5.1.1): "--", or transport padding then CRLF, makes it a
376# delimiter (0). Anything else makes it data, as "--Bextra" is for boundary B (1). Too few bytes: 2.
377def suffix.dash(s: String) -> U32:
378  match s:
379    case SNil{}:
380      2
381    case SCon{Chr{+c}, t}:
382      Bool.pick(U32, U32.is_eq(c, 45), 0, 1)

Uses (5)

Used by (1)