euporie.core.log.wrap

euporie.core.log.wrap(ft: StyleAndTextTuples, width: int, style: str = '', placeholder: str = '…', left: int = 0, truncate_long_words: bool = True, strip_trailing_ws: bool = False, margin: str = '') StyleAndTextTuples

Wrap formatted text at a given width.

If words are longer than the given line they will be truncated

Parameters:
  • ft – The formatted text to wrap

  • width – The width at which to wrap the text

  • style – The style to apply to the truncation placeholder

  • placeholder – The string that will appear at the end of a truncated line

  • left – The starting position within the first line

  • truncate_long_words – If True words longer than a line will be truncated

  • strip_trailing_ws – If True, trailing whitespace will be removed from the ends of lines

  • margin – Text to use a margin for the continuation of wrapped lines

Returns:

The wrapped formatted text