Cli.width_go: def of cli@0.2.0.0 Import: import cli@0.2.0.0/cli.bend as Cli Lines 992-998 of cli@0.2.0.0/cli.bend: https://jend.leeeet.dev/read.txt?path=cli@0.2.0.0/cli.bend&start_line=992&end_line=998 import Base # acc, plus the width of step, the last code point's, and of s after it. def width_go(s: String, step: WidthStep, acc: Nat) -> Nat: match s step: case SNil{} WidthStep{w, run}: Nat.add(w, acc) case SCon{head, tail} WidthStep{w, run}: +code = Char.to_u32(head) width_go(tail, code_step(code_class(code), run, code), Nat.add(w, acc)) 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.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=WidthStep https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=code_class https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=code_step