JAVA 字串切割+ArrayList
JAVA 字串切割+ArrayList<String>
public ArrayList<String> m_NameList;
public ArrayList<String> m_ValueList;
m_NameList= new ArrayList<String>(); //指定是String的型態
m_ValueList= new ArrayList<String>(); //指定是String的型態
m_NameList.clear();
m_ValueList.clear();
public void parserData2ArrayList(String StrSplit)
{
String StrBuf=””;
for(int i=0;i<m_DataList.size();i++)
{
StrBuf=m_DataList.get(i);
String[] AfterSplit = StrBuf.split(StrSplit);
m_NameList.add(AfterSplit[0]);
m_ValueList.add(AfterSplit[1]);
}
}