note 26376 deleted from function.wordwrap by danbrown
| From: | danbrown@php.net | Date: | Sun, 17 May 2009 18:38:22 +0000 |
| Subject: | note 26376 deleted from function.wordwrap by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-155155@lists.php.net to get a copy of this message | ||
Note Submitter: info*at*cirgo*dot*com
----
There was a little bug in the modification of Jeffrey Sambells wordwrap function writen by Alex of
oxyscripts.com...
The modified function would cut off the last character of the first half of the clipped string.
The line that reads:
$str = substr($str,0,$i).$cut.substr($str,$i+1,$str_len-1);
Needs to be:
$str = substr($str,0,$i+1).$cut.substr($str,$i+1,$str_len-1);
At least it does on WIN32 platform.
-Billy Olson
http://www.cirgo.com