Skip to content

five-on-it / apps/client/src/gui/layout / wrap

Function: wrap() ​

wrap(text, max, width): string[]

Defined in: apps/client/src/gui/layout.ts:257

A text broken into lines no wider than max: at spaces, a word wider than the line broken where it must; its own line breaks kept.

Parameters ​

text ​

string

max ​

number

width ​

(s) => number

Returns ​

string[]