Skip to main content

longest_width

Function longest_width 

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

Cells text can take once every token is filled in, at most (text_width, a wide character of widths two cells): the game’s tokens at their longest (Tokens::longest) and every name token as longest_name (the longest name in the table, so a rename can’t push the line over its limit). Unknown tokens, and name tokens without a table, count as written.