wordwrap

Wrap a String to a given number of characters.


Syntax


Parameters

  • String subject - The String to wrap.
  • Number width - The width at which to wrap (defaults to 75).
  • String break - The String to use at line ends (defaults to newline - ASCII code 10).
  • Boolean cut - Whether to split large words.
    • false (default) - Large words can make a line longer than width.
    • true - A word larger than width can be broken up.


Result

  • String - The wrapped String.

Returns subject wrapped at the column number specified by width, with each line terminated by break.

ptpscript/functions/wordwrap.txt · Last modified: 2007/01/24 10:15
 
 
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki