euporie.core.ft.table.align
- euporie.core.ft.table.align(ft: StyleAndTextTuples, how: FormattedTextAlign = FormattedTextAlign.LEFT, width: int | None = None, style: str = '', placeholder: str = '…', ignore_whitespace: bool = False) StyleAndTextTuples
Align formatted text at a given width.
- Parameters:
how – The alignment direction
ft – The formatted text to strip
width – The width to which the output should be padded. If
None
, the length of the longest line is usedstyle – The style to apply to the padding
placeholder – The string that will appear at the end of a truncated line
ignore_whitespace – If True, whitespace will be ignored
- Returns:
The aligned formatted text