def media.part
bend-kit-camber@0.15.0.1 · input.bend:120
import bend-kit-camber@0.15.0.1/input.bend as Input
import Base
120
121def media.part(split: Bool, +c: U32, +quoted: Bool, +escaped: Bool, acc: String, parts: List<&2, String>) -> Bool & Bool & String & List<&2, String>:
122 match split:
123 case True{}: (False{}, False{}, "", String.reverse(acc) <> parts)
124 case False{}:
125 (Bool.pick(Bool, U32.is_eq(c, 34) && Bool.not(escaped), Bool.not(quoted), quoted), quoted && U32.is_eq(c, 92) && Bool.not(escaped), SCon{Chr{c}, acc}, parts)