I have a string that I want to be split into an array by 4 characters
String I have:
String str = "ABCDEFGHIJKLMNOP";
I want output of:
String[] array = ["ABCD", "EFGH", "IJKL", "MNOP"];
Is there a way to do this?
I have a string that I want to be split into an array by 4 characters
String I have:
String str = "ABCDEFGHIJKLMNOP";
I want output of:
String[] array = ["ABCD", "EFGH", "IJKL", "MNOP"];
Is there a way to do this?