Skip to content

Function: wrapText() ​

ts
function wrapText(text: string, width: number): LuaArray<string>;

Break text into lines of at most a width, between words, cutting a word longer than a line into pieces.

Parameters ​

ParameterTypeDescription
textstringText to break.
widthnumberMost characters a line holds, one at least.

Returns ​

LuaArray<string>

Lines, none when the text is empty.