euporie.core.ft.html.strip
- euporie.core.ft.html.strip(ft: StyleAndTextTuples, left: bool = True, right: bool = True, chars: str | None = None, only_unstyled: bool = False) StyleAndTextTuples
Strip whitespace (or a given character) from the ends of formatted text.
- Parameters:
ft – The formatted text to strip
left – If
True
, strip from the left side of the inputright – If
True
, strip from the right side of the inputchars – The character to strip. If
None
, strips whitespaceonly_unstyled – If
True
, only strip unstyled fragments
- Returns:
The stripped formatted text