function LeftTrue($str,$n,$str2,$m,$type)
{
$l=strlen($str);
$TStr="";
$t=0;
for ($i=0; $i<$l; $i++) {
$c=ord(substr($str,$i,1));
if ($c<0)
$c=$c+65536;
if ($c>127) {
$t+=2;
$TStr=$TStr.(substr($str,$i,2));
$i++;
}else {
$t++;
$TStr=$TStr.(substr($str,$i,1));
}
if ($t>=$n)
break;
}
if($t>=$n || !$type) {
$function_ret=$TStr.str_repeat($str2,$n+$m-$t);
}else {
$function_ret=$TStr;
for($i=$t;$i<$n+$m;$i++)
$function_ret.=" ";
}
return $function_ret;
}

浙公网安备 33010602011771号