bug? truncate
| From: | Gerard | Date: | Sun, 09 Mar 2003 21:17:52 +0000 |
| Subject: | bug? truncate | ||
| Groups: | php.smarty.dev | ||
| Request: | Send a blank email to php-smarty-dev+get-928@lists.php.net to get a copy of this message | ||
$fragment = substr($string, 0, $length);
instead of
$fragment = substr($string, 0, $length+1);
?
|truncate:0:"" returns ''
|truncate:1:"" returns 'ab'
|truncate:2:"" returns 'abc'
|truncate:3:"" returns 'abcd'
Gerard