module Tui::Width

Extended Modules

Defined in:

tui/width.cr

Constant Summary

ANSI = /\e\[[0-9;?]*[a-zA-Z]/
WIDE_RANGES = { {4352, 4447}, {9001, 9002}, {11904, 12350}, {12353, 13311}, {13312, 19903}, {19968, 40959}, {40960, 42191}, {44032, 55203}, {63744, 64255}, {65072, 65103}, {65280, 65376}, {65504, 65510}, {127744, 129791}, {131072, 262141} }

Instance Method Summary

Instance Method Detail

def char_width(c : Char) : Int32 #

def clamp_ansi(text : String, max : Int32) : String #

def fit(text : String, target : Int32) : String #

def pad(text : String, target : Int32) : String #

def strip_ansi(text : String) : String #

def truncate(text : String, max : Int32, ellipsis : String = "…") : String #

def visible(text : String) : Int32 #

def width(text : String) : Int32 #