Skip to main content

lines_at_longest

Function lines_at_longest 

Source
pub fn lines_at_longest(
    text: &str,
    tokens: &dyn Tokens,
    longest_name: Option<usize>,
    width: usize,
    widths: &CellWidths,
) -> usize
Expand description

Lines text takes in a box width cells wide (word_wrap, a wide character of widths two cells) once every token is filled in as its longest: each token is written out as that many Ws, with the tokens and names counted as in longest_width. A token is so a Latin run that is never broken, the worst case (a typed name of that length). A line that fits the box here fits it with any player’s name.