Step.step.need.of: def of emerging-ezhttp@0.21.0.0 Import: import emerging-ezhttp@0.21.0.0/src/step.bend as Step Lines 113-122 of emerging-ezhttp@0.21.0.0/src/step.bend: https://jend.leeeet.dev/read.txt?path=emerging-ezhttp@0.21.0.0/src/step.bend&start_line=113&end_line=122 import Base import emerging-ezhttp@0.21.0.0/src/http.bend as Http # octets a request needs in all once its head has ended: the head, its blank # line and the octets its Content-Length names (0 when it names none) def step.need.of(c: Http.Cut) -> Maybe<&2, Nat>: match c: case Http.NoCut{}: None{} case Http.Cut{+before, after}: Some{Nat.add(Nat.add(String.length(before), 4n), step.clen(Http.digits.read(Http.first( Http.head.values(String.lines(before), "content-length")))))} Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.length https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.lines https://jend.leeeet.dev/definition.txt?path=emerging-ezhttp@0.21.0.0/src/http.bend&name=Cut https://jend.leeeet.dev/definition.txt?path=emerging-ezhttp@0.21.0.0/src/http.bend&name=digits.read https://jend.leeeet.dev/definition.txt?path=emerging-ezhttp@0.21.0.0/src/http.bend&name=first https://jend.leeeet.dev/definition.txt?path=emerging-ezhttp@0.21.0.0/src/http.bend&name=head.values https://jend.leeeet.dev/definition.txt?path=emerging-ezhttp@0.21.0.0/src/step.bend&name=step.clen