Frame.line_len: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/lsp/frame.bend as Frame Lines 306-310 of bolt@1.27.0.0/src/lsp/frame.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/lsp/frame.bend&start_line=306&end_line=310 import Base # a header line (reversed, its \r already dropped) updates the length def line_len(line: List<&2, U32>, +len: List<&2, Digit>) -> List<&2, Digit>: +s = String.from_list(chars(line, [])) +read = count.read(String.drop(s, 16n)) Bool.pick(List<&2, Digit>, String.starts_with(s, "Content-Length: "), Maybe.default(&2, List<&2, Digit>, read, len), len) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe.default https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.drop https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.from_list https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.starts_with https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/frame.bend&name=Digit https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/frame.bend&name=chars https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/frame.bend&name=count.read