replaceIndentByMargin
fun String.replaceIndentByMargin(newIndent: String = "", marginPrefix: String = "|"): String(source)
Detects indent by marginPrefix as it does trimMargin and replace it with newIndent.
Since Kotlin
1.1Parameters
marginPrefix
non-blank string, which is used as a margin delimiter. Default is |
(pipe character).
fun String.replaceIndentByMargin(newIndent: String = "", marginPrefix: String = "|"): String(source)
Detects indent by marginPrefix as it does trimMargin and replace it with newIndent.
Since Kotlin
1.0Parameters
marginPrefix
non-blank string, which is used as a margin delimiter. Default is |
(pipe character).