1
My problem is this:
I have the input string: "A|BB|CCC|DDDD|EEEEE|FFFFFF|GGGGGGG"
. I need to split this string in "|", so that in the case divided into 6.
But I need each value to enter an array of no more than 10 characters and with the "|".
For example:
array(0) = "A|BB|CCC" //8 caracteres
array(1) = "DDDD|EEEEE" //10 caracteres
array(2) = "FFFFFF" //6 caracteres
array(3) = "GGGGGGG" //7 caracteres
Like I’ve done so far:
- I used the split to break the input string;
- I made a for in the size of the array formed by the split;
- I run each array value next to a counter in an if that puts the values concatenated with "|" inside the array.