prependIndent

fun String.prependIndent(indent: String = " "): String(source)

Prepends indent to every line of the original string.

Doesn't preserve the original line endings.

Since Kotlin

1.0