public static boolean isEmpty(String str) {
if (str != null && !"".equals(str) && !"null".equalsIgnoreCase(str)) {
for(int i = 0; i < str.length(); ++i) {
char c = str.charAt(i);
if (c != ' ' && c != '\t' && c != '\r' && c != '\n') {
return false;
}
}
return true;
} else {
return true;
}
}
字符串 工具类
最新推荐文章于 2023-08-03 00:33:36 发布