isEmpty判断是否为空
来源:互联网 发布:网络语鹅是什么意思 编辑:程序博客网 时间:2024/06/05 11:22
public class IsEmpty {
public static boolean isEmpty(String input) {
if (input == null || "".equals(input)) {
return true;
}
for (int i = 0; i < input.length(); i++) {
char c = input.charAt(i);
if (c != ' ' && c != '\t' && c != '\r' && c != '\n') {
return false;
}
}
return true;
}
}
public static boolean isEmpty(String input) {
if (input == null || "".equals(input)) {
return true;
}
for (int i = 0; i < input.length(); i++) {
char c = input.charAt(i);
if (c != ' ' && c != '\t' && c != '\r' && c != '\n') {
return false;
}
}
return true;
}
}
阅读全文
0 0
- isEmpty判断是否为空
- Android比较字符串是否为空(isEmpty)
- 判断一个list集合是否为空,用isEmpty 还是 null的问题???
- java判断一个字符串是否为空,isEmpty和isBlank的区别
- 判断是否为空
- 判断是否为空
- 判断是否为空
- 如何判断List是否为空,也就是list.isEmpty()和list.size() == 0 有何区别
- 判断表是否为空?
- 判断变量是否为空
- 判断DataSet是否为空
- 判断result是否为空
- 判断DataTable是否为空
- 判断文本框是否为空
- 判断dataset是否为空
- 判断数组是否为空
- 判断指针是否为空
- 判断edit是否为空
- opencv(一)形状识别
- Android-----代码实现打开手机第三方应用APP
- 比特币(BitCoin)学习第五天比特币(BitCoin)算力变化及矿机如何选择?
- NOIP2014联合权值
- Throwing cards away I
- isEmpty判断是否为空
- 关于在JQ中链接后面加参数
- 深入理解异常处理机制的处理方式
- 二进制数的编码表示
- 解决ImportError DLL load failed的问题(python)
- sublime Text 3:Fatal pylint error -unicodedecodeError
- DES ECB模式JAVA PHP C#实现加密、解密兼容
- RS-232、RS-422与RS-485标准及应用
- i2c底层数据传输解析之RTC实时时钟