Flow\Helper::word_wrap PHP Method

word_wrap() public static method

public static word_wrap ( $obj = null, $width = 75, $break = " ", $cut = false )
    public static function word_wrap($obj = null, $width = 75, $break = "\n", $cut = false)
    {
        return wordwrap(strval($obj), $width, $break, $cut);
    }

Usage Example

Beispiel #1
0
 public function test_word_wrap()
 {
     $this->assertEquals("this is on a line\nof its own", Helper::word_wrap('this is on a line of its own', 17));
     $this->assertEquals("this is on a line<br>of its own", Helper::word_wrap('this is on a line of its own', 17, '<br>'));
 }