Return text inside an ascii textbox
(text, width, offset=0)
| 79 | |
| 80 | |
| 81 | def box_text(text, width, offset=0): |
| 82 | """ |
| 83 | Return text inside an ascii textbox |
| 84 | """ |
| 85 | box = " " * offset + "-" * (width+2) + "\n" |
| 86 | box += " " * offset + "|" + text.center(width) + "|" + "\n" |
| 87 | box += " " * offset + "-" * (width+2) |
| 88 | return box |
no outgoing calls
no test coverage detected