StringUtils中isNotEmpty和isNotBlank的区别

1,isNotEmpty(str)等价于 str != null && str != "" && str.length > 0。

2,isNotBlank(str) 等价于 str != null && str != "" && str.length > 0 && str.trim().length > 0。

同理:

1,isEmpty 等价于 str == null && str == "" || str.length == 0。

2,isBlank 等价于 str == null && str == "" || str.length == 0 || str.trim().length == 0。

原文地址:https://www.cnblogs.com/chuanqi1995/p/11846867.html