class

Glimmer::Renderer::WordWrapper

Inherits Reference < Object

WordWrapper handles ANSI-aware text wrapping.

It correctly accounts for zero-width ANSI escape codes when calculating

line lengths and wrapping text.

Constructors

new(width : Int32 = 80, break_long_words : Bool = true)
Source

Instance methods

break_long_words=(break_long_words : Bool)
Source
break_long_words?
Source
width
Source
width=(width : Int32)
Source
wrap(text : String) : Array(String)

Wraps the given text to the configured width.

Returns an array of wrapped lines.

Source