Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added some comments
  • Loading branch information
Christian Bender committed Jun 30, 2018
commit e97107df6561793ff38fb807ce24b91024c230dd
6 changes: 6 additions & 0 deletions core/src/processing/core/PApplet.java
Original file line number Diff line number Diff line change
Expand Up @@ -6161,6 +6161,10 @@ public Table loadTable(String filename, String options) {
}
}


/**
* Same method as above inclusive a optiona delimiter.
*/
public Table loadTable(String filename, String options, char delimiter) {

//System.out.printf("DEBUG: class: PApplet loadTable(String, String) filename=%s, options=%s\n",filename, options); //DEBUG
Expand All @@ -6181,6 +6185,8 @@ public Table loadTable(String filename, String options, char delimiter) {
System.err.println(filename + " does not exist or could not be read");
return null;
}

// call a other constructor of Table
return new Table(input, optionStr, delimiter);

} catch (IOException e) {
Expand Down
2 changes: 2 additions & 0 deletions core/src/processing/data/Table.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ public class Table {
// each expansion.
protected int expandIncrement;

// free delimiter - standard is the comma-seperator
protected char delimiter = ',';

/**
Expand Down Expand Up @@ -573,6 +574,7 @@ static class CommaSeparatedLine {
// int offset;
int start; //, stop;

// free delimiter. standard is comma-seperator
char delimiter = ',';

String[] handle(String line, BufferedReader reader, char delimiter) throws IOException {
Expand Down