fix a string bug

This commit is contained in:
Daniella / Tove 2022-06-26 04:51:31 +02:00
parent d6461db848
commit 757a84bfda

View file

@ -1723,8 +1723,9 @@ public class ISBPL {
String w = word.toString(); String w = word.toString();
while(w.startsWith("(") && w.length() > 1) while(w.startsWith("(") && w.length() > 1)
w = w.substring(1); w = w.substring(1);
while(w.endsWith(")") && w.length() > 1) if(!w.startsWith("\""))
w = w.substring(0, w.length() - 1); while(w.endsWith(")") && w.length() > 1)
w = w.substring(0, w.length() - 1);
words.add(w); words.add(w);
word = new StringBuilder(); word = new StringBuilder();
} }
@ -1735,8 +1736,9 @@ public class ISBPL {
String w = word.toString(); String w = word.toString();
while(w.startsWith("(") && w.length() > 1) while(w.startsWith("(") && w.length() > 1)
w = w.substring(1); w = w.substring(1);
while(w.endsWith(")") && w.length() > 1) if(!w.startsWith("\""))
w = w.substring(0, w.length() - 1); while(w.endsWith(")") && w.length() > 1)
w = w.substring(0, w.length() - 1);
words.add(w); words.add(w);
ArrayList<String> cleanWords = new ArrayList<>(); ArrayList<String> cleanWords = new ArrayList<>();