Skip to content

Commit

Permalink
Small change
Browse files Browse the repository at this point in the history
  • Loading branch information
lscgh committed Feb 9, 2024
1 parent 87c39f5 commit f4ac6df
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,8 @@ static ArrayList<String> removeEmptyElementsExceptForLast(String[] list) {
ArrayList<String> newList = new ArrayList<String>();
int i = 0;
for(String element: list) {
if(!element.trim().isEmpty() || (i == list.length - 1)) {
boolean elementIsLast = i == list.length - 1;
if(!element.trim().isEmpty() || elementIsLast) {
newList.add(element);
}

Expand Down

0 comments on commit f4ac6df

Please sign in to comment.