如aaa你好 截取4个,应该为aaa。
------解决方案--------------------
public static String getString(String args,int length){
if(length> args.length())
length=args.length();
String output= " ";
byte[] b=args.getBytes();
if(length/2!=0){
if(b[length] <0)
length=length-1;
}
output=new String(b,0,length);
return output;
}