Merge branch 'r3.8' into plan_route_fixes
This commit is contained in:
commit
c2146eb441
1 changed files with 7 additions and 5 deletions
|
@ -229,14 +229,16 @@ public class SearchPhrase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public int countWords(String w) {
|
public int countWords(String w) {
|
||||||
String[] ws = w.split(ALLDELIMITERS);
|
|
||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
|
if (!Algorithms.isEmpty(w)) {
|
||||||
|
String[] ws = w.split(ALLDELIMITERS);
|
||||||
for (int i = 0; i < ws.length; i++) {
|
for (int i = 0; i < ws.length; i++) {
|
||||||
String wd = ws[i].trim();
|
String wd = ws[i].trim();
|
||||||
if (wd.length() > 0) {
|
if (wd.length() > 0) {
|
||||||
cnt++;
|
cnt++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return cnt;
|
return cnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue