转载自: https://blog.csdn.net/vovo2000/article/details/106544264/
kotlin 字符串空值判断
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 str.length > 0 && str.trim().length > 0 ---> str.length > 0