New line does'nt work with txt File
in
Programming Questions
•
8 months ago
In my sketch I've imported a .txt file
-
void information() {String[] lines = loadStrings("text.txt");for (int i=0; i < lines.length; i++) {float categorie, year, information;String[] values = split(lines[i], '\t');txt[i][0] = values[0].trim(); // kategorietxt[i][1] = values[1].trim(); // jahrtxt[i][2] = values[2].trim(); // informationen}}
The lines are splitted with Tabs \t.
I want to print out the text with some new lines in it.
The structure of the txt file is for example:
- g 1982 Hello text text text. \n More text more text more text.
If I print it out (PFont), the text doesn't show up in a new line, it only shows both sentences and the \n in one line.
How can I get a line break in an imported txt file?
1