Lucee object methods reference

Object Method String.wrap

Wraps text so that each line has a specified maximum number of characters.
String.wrap(number limit,[boolean strip]):string

Category

string

Arguments

The arguments for this function are set. You can not use other arguments except the following ones.
Name Type Required Description
limit number  Yes Positive integer maximum number of characters to allow on a line.
strip boolean  No Whether to remove all existing newline and carriage return characters in the input string with spaces before wrapping the text.