Skip to main content

row

Function row 

Source
pub fn row(w: usize, spans: Vec<Span<'_>>) -> String
Expand description

One screen row from spans, clipped and padded to w.

The replacement for term::Row. Width there was tracked by hand, separately from the byte length, because inline ANSI makes len() a lie — that was the entire reason the type existed. Here the escapes are applied on the way out of the buffer, so every truncation and pad is over plain graphemes and belongs to the library.