substring(3)的用法http://www.w3school.com.cn/jsref/jsref_substring.asp
char
str[] = sb.toString().toCharArray();
for
(
int
i=
0
;i<str.length;i++){
System.out.println(str[i]);
}
sb.toString().trim().substring(
1
);把前面的截取掉
String json = sb.toString().trim().substring(
1
);
//String json = "{\"success\":true,\"msg\":\"成功\"}";
System.out.println(json);
System.out.println(json.length());
JSONObject jsonobject = JSONObject.fromObject(json.trim());
System.out.println(jsonobject);
所有评论(0)