Http.octs.take: def of emerging-ezhttp@0.21.0.0 Import: import emerging-ezhttp@0.21.0.0/src/http.bend as Http Lines 165-172 of emerging-ezhttp@0.21.0.0/src/http.bend: https://jend.leeeet.dev/read.txt?path=emerging-ezhttp@0.21.0.0/src/http.bend&start_line=165&end_line=172 import Base # the front of a string that is this many bytes of UTF-8 def octs.take(s: String, +n: Nat) -> String: match s: case SNil{}: SNil{} case SCon{+h, t}: +w = octs.width(Char.to_u32(h)) octs.take.step(Nat.is_lt(n, w), h, _u => octs.take(t, Nat.sub(n, w))) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char.to_u32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.sub https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=emerging-ezhttp@0.21.0.0/src/http.bend&name=octs.take.step https://jend.leeeet.dev/definition.txt?path=emerging-ezhttp@0.21.0.0/src/http.bend&name=octs.width