//phpwind 里边关于字符串分割的函数
function substrs($content,$length)
{
global $db_charset;
if($length && strlen($content)>$length)
{
if($db_charset!='utf-8')
{
$retstr='';
for($i = 0; $i < $length - 2; $i++) 
{
$retstr .= ord($content[$i]) > 127 ? $content[$i].$content[++$i] : $content[$i];
}
return $retstr.' ..';
}
else
{
return utf8_trim(substr($content,0,$length)).' ..';
}
}
return $content;
}