normalize

stringtools.normalize(string, indent=None)

Normalizes string.

>>> string = r'''
...     foo
...         bar
... '''
>>> print(string)

    foo
        bar
>>> print(stringtools.normalize(string))
foo
    bar
>>> print(stringtools.normalize(string, indent=4))
    foo
        bar
>>> print(stringtools.normalize(string, indent='* '))
* foo
*     bar

Returns string.