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
Post a Comment