I am trying to create a ragged array from a TAB delimited file using String.split. The basic data consists of numerous strings separated by TAB(\t) and each line terminates with a newline(\n);
the logic is:
//buffer = String with the Tab Delimited data:
// "abcd\tdefgh\tijk\nabcd\tdefgh\tijk\n"
String [][] array;
String[] tmp;
tmp = buffer.split("\n"); // {color:#ff0000}produces an array with two elements{color}
array = new String[ tmp.length ][150];
for (int x = 0; x < tmp.length; x++) {
array[x] = tmp[x].split("\t"); // {color:#ff0000}does not produce any results, array[x].length is 0{color}
}
The first split (buffer.split) correctly splits the data into the proper number of data lines. The second split (tmp[x].split) apparenlty fails to produce any results, there is no array created. I am at a loss as to what is going on. Any help would be appreciated.