def width

bend-kit-tty@0.1.0.1 · text.bend:37

import bend-kit-tty@0.1.0.1/text.bend as Text
import Base
import bend-kit-unicode@0.1.0.0/unicode.bend as Unicode

37# Display columns: East Asian Wide and Fullwidth clusters are 2, marks and controls 0, Ambiguous 1.
38# Escape sequences are not stripped: style()'s output is wider than what the terminal shows.
39def width(text: String) -> U32:
40  width.go(Unicode.graphemes(text), 0)

Uses (4)

Used by (2)