(s: str, maxlen: int)
| 60 | |
| 61 | |
| 62 | def left_align(s: str, maxlen: int) -> str: |
| 63 | stripped = stripcolor(s) |
| 64 | if len(stripped) > maxlen: |
| 65 | # too bad, we remove the color |
| 66 | return stripped[:maxlen] |
| 67 | padding = maxlen - len(stripped) |
| 68 | return s + ' '*padding |
| 69 | |
| 70 | |
| 71 | def build_menu( |
no test coverage detected