I am trying to figure out how to split a string into an 2d array based on k.
I know how to split it into individual strings or by regex.
How do you go about splitting it like this;
String text = "thisismyp";
// Result (where k = 3):
char[][] = {
{'t','h','i'},
{'s','i','s'},
{'m','y','p'}
};
.{k}should work where you have to compose the regex yourself inserting the value of k into it.