module

Term2::Components::RuneUtil

Class methods

replace_newlines(replacement : String) : Sanitizer
Source
sanitize(s : String) : String

Sanitize string (replace tabs, newlines, etc. if needed) Replaces tabs with 4 spaces and newlines with space. Also removes escape characters (\x1b).

Source
sanitize(s : String, *mods : Sanitizer) : String
Source
term_width(s : String) : Int32

Returns the display width of the string. Currently wraps Term2::Style.width (naive implementation). TODO: Implement proper East Asian Width calculation.

Source

Nested types