Skip to main content

Home > blockly > utils > string > wrap

utils.string.wrap() function

Wrap text to the specified width.

Signature:

export declare function wrap(text: string, limit: number): string;

Parameters

ParameterTypeDescription
textstringText to wrap.
limitnumberWidth to wrap each line.

Returns:

string

Wrapped text.