Wraps text so that each line has a specified maximum number
of characters.

wrap(String, limit [, strip]) → returns String

Argument Reference for the wrap function


Required: Yes
String or variable that contains one. The text to wrap.


Required: Yes
Positive integer maximum number of characters to allow on
a line.


Required: No
Default: NO
whether to remove all existing newline and carriage return
characters in the input string with spaces before wrapping
the text. Default: False.

Fork me on GitHub