Source for file wordwrap.php

Documentation is available at wordwrap.php

  1. <?php
  2.  
  3. /**
  4.  * Wraps a text at the given line length
  5.  * <pre>
  6.  *  * value : the text to wrap
  7.  *  * length : maximum line length
  8.  *  * break : the character(s) to use to break the line
  9.  *  * cut : if true, the line is cut at the exact length instead of breaking at the nearest space
  10.  * </pre>
  11.  * This software is provided 'as-is', without any express or implied warranty.
  12.  * In no event will the authors be held liable for any damages arising from the use of this software.
  13.  *
  14.  * @author     Jordi Boggiano <j.boggiano@seld.be>
  15.  * @copyright  Copyright (c) 2008, Jordi Boggiano
  16.  * @license    http://dwoo.org/LICENSE   Modified BSD License
  17.  * @link       http://dwoo.org/
  18.  * @version    1.0.0
  19.  * @date       2008-10-23
  20.  * @package    Dwoo
  21.  */
  22. function Dwoo_Plugin_wordwrap_compile(Dwoo_Compiler $compiler$value$length=80$break="\n"$cut=false)
  23. {
  24.     return 'wordwrap('.$value.','.$length.','.$break.','.$cut.')';
  25. }

Documentation generated on Sat, 18 Jul 2009 21:05:27 +0200 by phpDocumentor 1.4.0