StringIndentation extension

Indentation and layout control for multi-line strings.

on

Methods

hangingIndent(String indentation) → String

Available on String, provided by the StringIndentation extension

Adds indentation to all lines except the first (hanging indent).
indent(String indentation) → String

Available on String, provided by the StringIndentation extension

Adds indentation to the beginning of every line in the string.
removeHangingIndent(String indentation) → String

Available on String, provided by the StringIndentation extension

Removes indentation from all lines except the first.
removeIndent(String indentation) → String

Available on String, provided by the StringIndentation extension

Removes indentation from the start of every line if present.
removeReverseHangingIndent(String indentation) → String

Available on String, provided by the StringIndentation extension

Removes indentation from only the first line if present.
reverseHangingIndent(String indentation) → String

Available on String, provided by the StringIndentation extension

Adds indentation to only the first line (reverse hanging indent).