mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
remove rows/cols from beginning in trim()
This commit is contained in:
@@ -4067,6 +4067,11 @@ public class Table {
|
||||
}
|
||||
setColumnCount(lastColumn + 1);
|
||||
|
||||
// trim() works from both sides
|
||||
while (getColumnCount() > 0 && isEmptyArray(getStringColumn(0))) {
|
||||
removeColumn(0);
|
||||
}
|
||||
|
||||
// remove empty rows (starting from the end)
|
||||
int lastRow = lastRowIndex();
|
||||
//while (isEmptyRow(lastRow) && lastRow >= 0) {
|
||||
@@ -4074,6 +4079,10 @@ public class Table {
|
||||
lastRow--;
|
||||
}
|
||||
setRowCount(lastRow + 1);
|
||||
|
||||
while (getRowCount() > 0 && isEmptyArray(getStringRow(0))) {
|
||||
removeRow(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user