分类:
2005-12-16 16:59:51
function char_jq($str,$strlen=10,$other=true)
{
$j = 0;
for($i=0;$i<$strlen;$i++)
{
if(ord(substr($str,$i,1))>0xa0) $j++;
}
if($j%2!=0) $strlen--;
$rstr=substr($str,0,$strlen);
if (strlen($str)>$strlen && $other) $rstr.='...';
return $rstr;
};
?>