Bug fixed with the Offset in trimString function.

master
Victor De la Rocha 2008-10-26 23:32:55 +00:00
parent ac111d5348
commit 87a8876594
1 changed files with 64 additions and 62 deletions

View File

@ -488,6 +488,8 @@ if(!defined('entry') || !entry) die('Not a valid page');
}
function trimString($string, $len = "") {
if($len>strlen($string) or $len<1)
return $string;
$string = strip_tags($string);
$len = (empty($len)) ? "50" : $len ;
return ( strpos($string, " ", $len) ) ? substr_replace($string, "...", $len) : $string ;