reindent

emlib.textlib.reindent(text, prefix)[source]

Reindent a given text. Replaces the indentation with a new prefix.

Parameters:
  • text (str) – the text to reindent

  • prefix (str) – the new prefix to add to each line

Return type:

str

Returns:

the reindented text