Documentation

TermColor.Layout.Width

TermColor.Layout.Width: terminal display width #

Width is measured from visible characters, never from rendered ANSI escapes. The policy is deterministic: controls and combining marks occupy zero columns, common CJK and emoji ranges occupy two columns, and ambiguous characters occupy one.

Display width of one character in a terminal cell grid.

Equations
  • One or more equations did not get rendered due to their size.
Instances For

    Maximum display width of the lines in a string.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      def TermColor.Layout.expandTabs (tabWidth : Nat) (text : String) :

      Expand tabs to the next tab stop. A zero tab width is treated as one.

      Equations
      Instances For
        def TermColor.Layout.expandTabs.go (tabWidth column : Nat) :
        Equations
        Instances For

          Display width after expanding tabs to the supplied tab stops.

          Equations
          Instances For

            Maximum visible width of a styled text value, ignoring ANSI styling.

            Equations
            Instances For

              Number of logical lines in a styled text value.

              Equations
              Instances For