Function rushell_deps_linefeed::table::format_columns[][src]

pub fn format_columns<S: AsRef<str>>(
    strs: &[S],
    screen_width: usize,
    horizontal: bool
) -> Option<Vec<usize>>

Formats a series of strings into columns, fitting within a given screen width. Returns the size of each resulting column, including spacing.

If the strings cannot be formatted into columns (e.g. one or more strings are longer than the screen width) or the result would be only one column, None is returned.