Legend
| Extension method: IEnumerable<string> WordWrap( |
this string | text | Text to be word-wrapped. |
int | maxWidth | The maximum number of characters permitted on a single line, not counting the end-of-line terminator. |
int | hangingIndent | The number of spaces to add to each line except the first of each paragraph, thus creating a hanging indentation. |
The supplied text will be split into "paragraphs" at the newline characters. Every paragraph will begin on a new line in the word-wrapped output, indented by the same number of spaces as in the input. All subsequent lines belonging to that paragraph will also be indented by the same amount.
All multiple contiguous spaces will be replaced with a single space (except for the indentation).