indent function

Indent text for a certain number of spaces. If the text is only whitespace, leave it as such