def line_len
import bolt@1.27.0.0/src/lsp/frame.bend as Frameimport Base
306# a header line (reversed, its \r already dropped) updates the length
307def line_len(line: List<&2, U32>, +len: List<&2, Digit>) -> List<&2, Digit>:
308 +s = String.from_list(chars(line, []))
309 +read = count.read(String.drop(s, 16n))
310 Bool.pick(List<&2, Digit>, String.starts_with(s, "Content-Length: "), Maybe.default(&2, List<&2, Digit>, read, len), len)