index method error removed
This commit is contained in:
1 parent
a7c1e411d0
commit
6b7c4fb736
1 file changed
+3
-1
+3
-1
@@ -181,9 +181,10 @@ public class Text {
|
|||||||
String firstLetter;
|
String firstLetter;
|
||||||
String restLetters;
|
String restLetters;
|
||||||
for (int i = 0; i < text.size(); i++) {
|
for (int i = 0; i < text.size(); i++) {
|
||||||
String[] words = text.get(i).trim().toLowerCase().split("[ :;.,!?><+*}{)('/\n]+");
|
String[] words = text.get(i).trim().toLowerCase().split("[. ,:?!\"'-]+");
|
||||||
for (String word : words) {
|
for (String word : words) {
|
||||||
//Words get formatted consistently
|
//Words get formatted consistently
|
||||||
|
if(word.length()>0){
|
||||||
counter = 1;
|
counter = 1;
|
||||||
firstLetter = word.substring(0, 1);
|
firstLetter = word.substring(0, 1);
|
||||||
restLetters = word.substring(1);
|
restLetters = word.substring(1);
|
||||||
@@ -207,3 +208,4 @@ public class Text {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user