开发者

Parse string in j2me

开发者 https://www.devze.com 2023-02-11 13:19 出处:网络
String response=\"making year:2011-01-01 id:1011\"; We want to parse this string like 开发者_Python百科below:
String response="making year:2011-01-01 id:1011";

We want to parse this string like 开发者_Python百科below:

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

How can I do this in j2me?


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

精彩评论

暂无评论...
验证码 换一张
取 消