We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I have to split a file (test.txt) consisting of lines separated by a CR or LF or both. The split() function does not accept the \r or \n codes.
String temp[] = loadStrings(selection.getAbsolutePath());
data= (split(temp [0], '\r'));
test.txt
aap noot mies
tuur poes
kat hond
Answers
Try splitTokens(). Please check the reference.
Kf
Your temp array is already the split data! That's why it's an array.
Try
println()
ing temp[0], temp[1], and temp[2] to see what I mean.tnx