Paragraph Formatter
class ParagraphFormatter(windowWidth: Int = 80, leftMargin: Int = 0, rightMargin: Int = 0, firstIndent: Int = 0, restIndent: Int = 0)
A ParagraphFormatter object holds a particular paragraph style in the form of window width, margin, and indentation settings. It is then used to apply those whitespace and word-wrap settings to a String.
This is intended to be the final format procedure applied to a String before it is output, and all adjacent, non-newline character whitespace is condensed to a single space.
Author
Leslie Schultz
Parameters
window Width
The number of characters that can fit horizontally in the window.
left Margin
The number of spaces that all text should be, minimum, from the left side of the screen.
right Margin
The number of spaces that all text should be, minimum, from the right side of the screen.