replaceIndentByMargin

Common
JVM
JS
Native
1.0
fun String.replaceIndentByMargin(
    newIndent: String = "",
    marginPrefix: String = "|"
): String

Detects indent by marginPrefix as it does trimMargin and replace it with newIndent.

Parameters

marginPrefix - non-blank string, which is used as a margin delimiter. Default is | (pipe character).