Function linefeed::table::format_columns
source · pub fn format_columns<S: AsRef<str>>(
strs: &[S],
screen_width: usize,
horizontal: bool
) -> Option<Vec<usize>>
Expand description
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.