Functions | |
def | wrap_always |
def | wrap_onspace |
def | wrap_onspace_strict |
def wordWrappers.wrap_always | ( | text, | |
width | |||
) |
A simple word-wrap function that wraps text on exactly width characters. It doesn't split the text in words.
Definition at line 5 of file wordWrappers.py.
References join().
Referenced by wrap_onspace_strict().
def wordWrappers.wrap_onspace | ( | text, | |
width | |||
) |
A word-wrap function that preserves existing line breaks and most spaces in the text. Expects that existing line breaks are posix newlines (\n).
Definition at line 13 of file wordWrappers.py.
Referenced by wrap_onspace_strict().
def wordWrappers.wrap_onspace_strict | ( | text, | |
width | |||
) |
Similar to wrap_onspace, but enforces the width constraint: words longer than width are split.
Definition at line 27 of file wordWrappers.py.
References join(), wrap_always(), and wrap_onspace().