StringUtils中有很多判断字符串是否为空的方法,其中
isNotEmpty(str)判断不为空
等价于 str != null && str.length > 0。
isNotBlank(str)判断不为空,且长度不为0,且不由空白符(whitespace)构成
等价于 str != null && str.length > 0 && str.trim().length > 0。
isEmpty(str)判断为空
等价于 str == null || str.length == 0。
isBlank(str)判断为空,算空格
等价于 str == null || str.length == 0 || str.trim().length == 0。
而且 str.length > 0 && str.trim().length > 0。