Java截取前8位保留后面的字符串
public class ZhengZe { public static void main(String[] args) { String b = "postData{1,2,3}"; System.out.println(b+"\t"+b.length()); b.substring(8); System.out.println(b.substring(8)+"\t"+b.substring(8).length()); } }
输出
postData{1,2,3} 15
{1,2,3} 7