trello/
formatting.rs

1use unicode_width::UnicodeWidthStr;
2
3pub fn title(text: &str) -> String {
4    let border = "=".repeat(UnicodeWidthStr::width(text));
5
6    [format!(" {} ", text), format!("={}=", border)].join("\n")
7}
8
9pub fn header(text: &str, header_char: &str) -> String {
10    [text, &header_char.repeat(UnicodeWidthStr::width(text))].join("\n")
11}