Skip to main content

pad_text_to_width

Function pad_text_to_width 

Source
pub fn pad_text_to_width(text: &str, target_width: usize) -> Cow<'_, str>
Expand description

Pads text with trailing spaces to reach target_width display columns. Returns the original text unchanged if it already meets or exceeds the target.