Syntax: wraptext2(int widthInPixels, float zoom, string delimiters, string text);
Returns array of strings.


Divides text into several parts so as to fit within the specified width in pixels.
If delimiters is defined, it will prefer to split the string after these. Each character in the delimiters string is considered a separate delimiter.
Any spaces at the end of a string will be removed. I.e, instead of {"foo bar ", "baz"}, it will return {"foo bar", "baz"}.
wraptext2 is typically used in conjunction with showtext.


function onCreated()
  echo(wraptext2(100, 1, " ", "foo bar baz cux grault"));

... Will echo "foo bar","baz cux",grault



There are no comments on this page. [Add comment]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki