trello/formatting.rs
1pub fn title(text: &str) -> String {
2 let border = "═".repeat(text.chars().count());
3
4 [
5 format!("╔═{}═╗", border),
6 format!("║ {} ║", text),
7 format!("╚═{}═╝", border),
8 ]
9 .join("\n")
10}
11
12pub fn header(text: &str, header_char: &str) -> String {
13 [text, &header_char.repeat(text.chars().count())].join("\n")
14}