pub fn pad(text: &str, width: usize) -> String
Truncates text to width terminal columns and pads it with spaces to exactly that width (format!("{:<N}") counts characters, not columns).
text
width
format!("{:<N}")