Splitting array not working in android -


i splitting string sample text in middle. not splitting. please me went wrong

string[] str;  parts[1] = "loopstwatch out testingloopstthis makes difference"; str = parts[1].trim().split("loopst"); 

string[] arr;                 arr = "loopstwatch out testingloopstthis makes difference".trim().split("loopst");                 log.e("data arr[0]",":"+arr[0]);                 log.e("data arr[1]",":"+arr[1]);                 log.e("data arr[2]",":"+arr[2]); 

output

 arr[0] :"" arr[1] :"watch out testing" arr[2] :"this makes difference" 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -