方法一
public static boolean isEmpty(String str){
        if(str==null||"".equals(str)){
            return true;
        }
        return false;
    }方法二
TextUtils.isEmpty("需要判断的字符串");
Android判断字符是否为空
阅读 193
2022-11-28
public static boolean isEmpty(String str){
        if(str==null||"".equals(str)){
            return true;
        }
        return false;
    }TextUtils.isEmpty("需要判断的字符串");
相关推荐
精彩评论(0)