Function justify

Source
pub fn justify(input: &str, line_width: u32) -> String
Expand description

ยงExamples

use justify_string::justify;

assert_eq!(
    justify("123 12 123456789abc", 8),
    concat!(
        "123   12\n",
        "12345678\n",
        "9abc    ",
    )
);

See tests for more.