0
String response="making year:2011-01-01 id:1011";
我們要分析此字符串象下面這樣:解析字符串在J2ME
t1=making year:2011-01-01;
t2=id:1011;
我怎樣才能做到這一點在J2ME?
String response="making year:2011-01-01 id:1011";
我們要分析此字符串象下面這樣:解析字符串在J2ME
t1=making year:2011-01-01;
t2=id:1011;
我怎樣才能做到這一點在J2ME?
int index = response.indexOf("id:");
if (index != -1)
{
String t1 = response.substring(0,index);
String t2 = response.substring(index);
}