var content = "12345,abcde";
var num = content.substring(0,5);//12345
var letter = content.substring(7,11);//abcde
var i = content.indexof(","); //6
var data = content.substring(i+1,content.length);//abcde
标签:class length blog 字符串的操作 var pos indexof sub ring
var content = "12345,abcde";
var num = content.substring(0,5);//12345
var letter = content.substring(7,11);//abcde
var i = content.indexof(","); //6
var data = content.substring(i+1,content.length);//abcde
标签:class length blog 字符串的操作 var pos indexof sub ring
原文地址:https://www.cnblogs.com/wuhu/p/8434779.html