(text: &str, width: usize)
| 33 | } |
| 34 | |
| 35 | pub fn pad_right(text: &str, width: usize) -> String { |
| 36 | let text_width = text.width(); |
| 37 | if text_width >= width { |
| 38 | return text.to_string(); |
| 39 | } |
| 40 | format!("{}{}", text, " ".repeat(width - text_width)) |
| 41 | } |
| 42 | |
| 43 | pub fn center_text(text: &str, width: usize) -> String { |
| 44 | let text_width = text.width(); |
nothing calls this directly
no outgoing calls
no test coverage detected