取字符串以逗号隔开的两个值

用字符串存储多个子字符串,取字符串以逗号隔开的两个子字符串

int commaIndex = String1.indexOf(",",0);
String temp_prjid = String1.substring(0,commaIndex);            
String temp_userid = String1.substring(commaIndex);

 

posted @ 2016-08-23 11:35  木子执手  阅读(2740)  评论(0编辑  收藏  举报