prependIndent

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

Prepends indent to every line of the original string.

The lines in the original string can be separated with \r\n (CRLF), \n (LF), or \r (CR) characters, however, the lines in the resulting string will be separated solely with \n (LF) character.

Since Kotlin

1.0