Home > @rushstack/terminal > PrintUtilities > wrapWords
PrintUtilities.wrapWords() method
Applies word wrapping.
Signature:
static wrapWords(text: string, maxLineLength?: number, indent?: number): string;
Parameters
Parameter | Type | Description |
|---|---|---|
text | string | The text to wrap |
maxLineLength | number | (Optional) The maximum length of a line, defaults to the console width |
indent | number | (Optional) The number of spaces to indent the wrapped lines, defaults to 0 |
Returns:
string