Indent text.
(t: str, indent: int = 0, sep: str = '\n')
| 82 | |
| 83 | |
| 84 | def indent(t: str, indent: int = 0, sep: str = '\n') -> str: |
| 85 | """Indent text.""" |
| 86 | return sep.join(' ' * indent + p for p in t.split(sep)) |
| 87 | |
| 88 | |
| 89 | def truncate(s: str, maxlen: int = 128, suffix: str = '...') -> str: |