Text.width: def of bend-kit-tty@0.1.0.1 Import: import bend-kit-tty@0.1.0.1/text.bend as Text Lines 37-40 of bend-kit-tty@0.1.0.1/text.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-tty@0.1.0.1/text.bend&start_line=37&end_line=40 import Base import bend-kit-unicode@0.1.0.0/unicode.bend as Unicode # Display columns: East Asian Wide and Fullwidth clusters are 2, marks and controls 0, Ambiguous 1. # Escape sequences are not stripped: style()'s output is wider than what the terminal shows. def width(text: String) -> U32: width.go(Unicode.graphemes(text), 0) Uses (4): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bend-kit-tty@0.1.0.1/text.bend&name=width.go https://jend.leeeet.dev/definition.txt?path=bend-kit-unicode@0.1.0.0/unicode.bend&name=graphemes