Functions | |
def | wrap_always (text, width) |
def | wrap_onspace (text, width) |
def | wrap_onspace_strict (text, width) |
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 7 of file wordWrappers.py.
References createfilelist.int, and 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 15 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 29 of file wordWrappers.py.
References join(), edm.print(), str, wrap_always(), and wrap_onspace().