ZF-11809: Wrong handling of ending spaces in Zend_Text_MultiByte::wordWrap()
Description
If you give the static method Zend_Text_MultiByte::wordWrap a string that has the same length as the maximum length for a line plus an ending space and set the cut parameter to true, the ending space will be added to the first line and no second line is created.
For example
$text = 'aloha ';
echo Zend_Text_MultiByte::wordWrap($text, 5, '-', true);
returns 'aloha ' but should return 'aloha-'
Comments
Posted by Nico Nägele (peaceman) on 2011-10-08T22:46:29.000+0000
Added Bugfix and unittest