trimIndentAfterFirstLine

Removes the indentation from every line in this string after the first line, and also removes any blank lines appearing before the first non-blank line.

This method assumes the original string has multiple lines. The first line is left intact, but all subsequent lines have their leading white space removed.

Example usage:

val text = """
Keep leading
Remove indent
Remove indent
"""
val result = text.trimIndentAfterFirstLine()
// Result is:
// """
// Keep leading
// Remove indent
// Remove indent
// """

Receiver

The string from which to remove indentation after the first line.

Return

A new string with the same first line, but with indentation removed from subsequent lines.