-
String arrays
hi all,
Assume I have a String ,
like;
Code:
String str= "01hhqwgnfklnlkgfkvvokopoepw";
I need to divide this string in to small string blocks (2 characters in one block) and those divided blocks in to a another string array without writing a big code is there a easy way...
my result should be:
Code:
String strArray[]= {"01","hh","qw".....etc};
//for this part i think need a loop but please tell me how to do the spliting part?:confused:
thanks a lot
-
First and easy thing that comes to mind is a loop and String.substring(). Experiment and post if you get stuck.