标签:sub utf-8 截取 static cep substring length ring exce
public static String idgui(String s,int num)throws Exception{
int changdu = s.getBytes("UTF-8").length;
if(changdu > num){
s = s.substring(0, s.length() - 1);
s = idgui(s,num);
}
return s;
}
标签:sub utf-8 截取 static cep substring length ring exce
原文地址:http://www.cnblogs.com/myjoan/p/6196938.html