indent

fun String.indent(spaces: Int): String

Prepends spaces space characters to every line of this string, including blank lines.

Line breaks (\n, \r\n, and \r) are recognized and preserved as they are, and no padding is added after a trailing line break. Returns this string unchanged when it is empty or spaces is zero or negative.