string - How to split the datas in android while using soap -
i had doubt while using soap ,how split string,is there possibility.
//this original data afternoon-99127.79; night-67236.27; morning-61876.65; evening-20271.42; housekeeping-5444.05; need; afternoon 99127.79 night 67236 morning 61876.65; evening 20271.42; housekeeping 5444.05;
i split using semicolon , don't know how use sub strings,use of start , end index don't know how give values..actually want split before "-" , after "-".
string total_string = "afternoon-99127.79;night-67236.27;morning-61876.65;evening-20271.42;housekeeping-5444.05;"; string[] spilted_string = total_string.split(";"); (int i=0;i<spilted_string.length;i++){ system.out.println(spilted_string[i].split("-")[0]); system.out.println(spilted_string[i].split("-")[1]); }
Comments
Post a Comment