[LANG-1584] Refine StringUtils.isNumericSpace (#573)
* refine isNumericSpace * fix same issues in other two functions
This commit is contained in:
parent
902a0faab4
commit
ea8428ab75
|
@ -3398,7 +3398,8 @@ public class StringUtils {
|
|||
}
|
||||
final int sz = cs.length();
|
||||
for (int i = 0; i < sz; i++) {
|
||||
if (!Character.isLetterOrDigit(cs.charAt(i)) && cs.charAt(i) != ' ') {
|
||||
final char nowChar = cs.charAt(i);
|
||||
if (nowChar != ' ' && !Character.isLetterOrDigit(nowChar) ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -3433,7 +3434,8 @@ public class StringUtils {
|
|||
}
|
||||
final int sz = cs.length();
|
||||
for (int i = 0; i < sz; i++) {
|
||||
if (!Character.isLetter(cs.charAt(i)) && cs.charAt(i) != ' ') {
|
||||
final char nowChar = cs.charAt(i);
|
||||
if (nowChar != ' ' && !Character.isLetter(nowChar)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -3810,7 +3812,8 @@ public class StringUtils {
|
|||
}
|
||||
final int sz = cs.length();
|
||||
for (int i = 0; i < sz; i++) {
|
||||
if (!Character.isDigit(cs.charAt(i)) && cs.charAt(i) != ' ') {
|
||||
final char nowChar = cs.charAt(i);
|
||||
if (nowChar != ' ' && !Character.isDigit(nowChar)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue