WrapText

(Engine-Level Function)

Description: Breaks a text string based on given font and width and returns the text segments in an array.
Returns: Array of text
Usage: Script Only.
Function Groups: String and Buffer
Related to: BuffToArray | Font
Format: WrapText(String, Font, Width[, GetSpaceLen])
Parameters:  
String
Required. The text to be wrapped.
Font
Required The font to use for the width calculation, as returned by a call to theFont function.
Width
Required numeric. The maximum number of pixels to be occupied by any line of the wrapped text.
GetSpaceLen
Optional Boolean. Set TRUE to return a 2D array, the first column (left-most) will contain wrapped text, and the second (right-most) will contain the trailing whitespace length. Set FALSE to return a one-dimensional array that contains only the wrapped text. Defaults to FALSE.
Comments: Pixels are assumed to have a dpi size of 96.