findMinimumIndent

Reads the receiver File and finds the minimum indent in its content.

Receiver

File The file to process.

Return

A String containing the minimum indent.


fun String.findMinimumIndent(absoluteMinimum: String = " "): String(source)

Finds and returns the minimum indentation for this String, with an optional absoluteMinimum to be returned if the minimum indent is less than the absolute minimum.

Receiver

The original String.

Return

The minimum indentation of the string, or the absolute minimum if the minimum is less.

Parameters

absoluteMinimum

The absolute minimum indent to be returned if the minimum is less. Defaults to " ".