Merge branch 'r3.8' into plan_route_fixes

This commit is contained in:
Vitaliy 2020-09-25 13:20:20 +03:00
commit c2146eb441

View file

@ -229,14 +229,16 @@ public class SearchPhrase {
}
public int countWords(String w) {
String[] ws = w.split(ALLDELIMITERS);
int cnt = 0;
if (!Algorithms.isEmpty(w)) {
String[] ws = w.split(ALLDELIMITERS);
for (int i = 0; i < ws.length; i++) {
String wd = ws[i].trim();
if (wd.length() > 0) {
cnt++;
}
}
}
return cnt;
}