String(byte[] bytes, int offset, int length) --> Constructs a new String by decoding the specified subarray of bytes using the platform's default charset.默认编码String(byte[] bytes, int offset, int length, String charsetName) Constructs a new String by decoding the specified subarray of bytes using the specified charset
String newS = str.subString(0, 11 );
这样就会取出0-10的字符。另外,java用unicode,不用考虑byte和全角半角。他总是2byte一个char.
--> Constructs a new String by decoding the specified subarray of bytes using the platform's default charset.默认编码String(byte[] bytes, int offset, int length, String charsetName)
Constructs a new String by decoding the specified subarray of bytes using the specified charset