format

fun format(str: String): String

Answer the supplied string reformatted with margins, indentation, and words wrapped within those constraints, if possible. Non-newline whitespace is collapsed into a single space.

Return

The formatted string.

Parameters

str

The supplied string.