mysql select * frm aaa limit 20xxx ,limit后的字符串无法转换为数字的处理

This commit is contained in:
tivenwang
2016-06-07 10:56:16 +08:00
parent 7d8763bcb9
commit 1ccaaa5572
3 changed files with 50 additions and 2 deletions
@@ -95,7 +95,7 @@ public class StringUtils {
return a.equalsIgnoreCase(b);
}
public static boolean isEmpty(String value) {
public static boolean isEmpty(CharSequence value) {
if (value == null || value.length() == 0) {
return true;
}
@@ -119,4 +119,18 @@ public class StringUtils {
}
return h;
}
public static boolean isNumeric(final CharSequence cs) {
if (isEmpty(cs)) {
return false;
}
final int sz = cs.length();
for (int i = 0; i < sz; i++) {
if (!Character.isDigit(cs.charAt(i))) {
return false;
}
}
return true;
}
}