1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
pub fn title(text: &str) -> String {
    let border = "═".repeat(text.chars().count());

    [
        format!("╔═{}═╗", border),
        format!("║ {} ║", text),
        format!("╚═{}═╝", border),
    ]
    .join("\n")
}

pub fn header(text: &str, header_char: &str) -> String {
    [text, &header_char.repeat(text.chars().count())].join("\n")
}