textlib: Routines for working with text¶
Routines for working with text
Functions¶
|
Escape ansi codes |
|
Returns the first sentence from txt |
|
Find possible matches to pattern in |
|
get the number of spaces used to indent code |
|
Like join, but preserving indentation |
|
Remove empty lines from the top and bottom |
|
Strip empty lines from the end of the list |
|
Remove empty lines from the top |
|
Like str.ljust, but ensures that the output is always the given width |
|
Create a function to replace many subtrings at once |
|
Indent code matching modelcode |
|
Add quotation marks around s if needed |
|
Reindent a given text. |
|
Split s into strings of max. |
|
Strip leading and trailing empty lines |
|