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;
}
时间: 2024-10-13 11:13:22