1 isNotEmpty(str)等价于 str != null && str.length > 0
2 isNotBlank(str) 等价于 str != null && str.length > 0 && str.trim().length > 0
3 同理
4 isEmpty 等价于 str == null || str.length == 0
5 isBlank 等价于 str == null || str.length == 0 || str.trim().length == 0
6
7 str.length > 0 && str.trim().length > 0 ---> str.length > 0
kotlin isNotEmpty 和isNotBlank的区别【java字符串判空】
最新推荐文章于 2024-07-27 12:27:35 发布