Cli.width: def of cli@0.2.0.0 Import: import cli@0.2.0.0/cli.bend as Cli Lines 1000-1005 of cli@0.2.0.0/cli.bend: https://jend.leeeet.dev/read.txt?path=cli@0.2.0.0/cli.bend&start_line=1000&end_line=1005 import Base # Display columns, as Rust's unicode-width 0.2 counts them: each code point's # own width, except that an emoji sequence is one cell 2 wide. A pictograph # that a ZWJ joins, a skin tone after an emoji that takes one, and tag # characters add nothing; VS16 widens a 1-wide emoji to 2. def width(s: String) -> Nat: width_go(s, WidthStep{0n, EmojiNone{}}, 0n) Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat 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=EmojiRun 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=width_go