Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/terminal > PrintUtilities > wrapWords

PrintUtilities.wrapWords() method

Applies word wrapping. If maxLineLength is unspecified, then it defaults to the console width.

Signature:

static wrapWords(text: string, maxLineLength?: number, indent?: number): string;

Parameters

ParameterTypeDescription
textstring
maxLineLengthnumber(Optional)
indentnumber(Optional)

Returns:

string