2011-02-14 3 views
0
String response="making year:2011-01-01 id:1011"; 

Nous voulons analyser cette chaîne comme ci-dessous:chaîne Parse dans J2ME

t1=making year:2011-01-01; 
t2=id:1011; 

Comment puis-je faire cela en J2ME?

Répondre

2
int index = response.indexOf("id:"); 
if (index != -1) 
{ 
    String t1 = response.substring(0,index); 
    String t2 = response.substring(index); 
}