Zi 字媒體
2017-07-25T20:27:27+00:00
JAVA 字串切割+ArrayList
public ArrayList m_NameList;
public ArrayList m_ValueList;
m_NameList= new ArrayList(); //指定是String的型態
m_ValueList= new ArrayList(); //指定是String的型態
m_NameList.clear();
m_ValueList.clear();
public void parserData2ArrayList(String StrSplit)
{
String StrBuf=””;
for(int i=0;i
{
StrBuf=m_DataList.get(i);
String[] AfterSplit = StrBuf.split(StrSplit);
m_NameList.add(AfterSplit[0]);
m_ValueList.add(AfterSplit[1]);
}
}
寫了
5860316篇文章,獲得
23313次喜歡