Skip to main content

pad_start

Function pad_start 

Source
pub fn pad_start(line: &str, width: usize) -> String
Expand description

Pads line on the left so it ends at column width (right alignment).

use shellgame::ui::text::pad_start;

assert_eq!(pad_start("42", 5), "   42");