getIndentationLevel method
Returns the tree level for the line.
Implementation
int getIndentationLevel(String line) {
int i = 0;
while (line[i] == " ") {
i++;
}
return (i / 2).round();
}
Returns the tree level for the line.
int getIndentationLevel(String line) {
int i = 0;
while (line[i] == " ") {
i++;
}
return (i / 2).round();
}