StringUtils.isNotBlank能判断null吗
时间: 2024-04-25 13:24:13 浏览: 116
StringUtils.isNotBlank方法不能判断null。该方法用于判断字符串是否不为空且长度不为0且不由空白符构成。如果传入的参数为null,该方法会返回false。所以,如果需要判断null,可以使用StringUtils.isNotEmpty方法。
#### 引用[.reference_title]
- *1* [字符串非空判断:StringUtils中 isNotEmpty 和isNotBlank的区别](https://blog.csdn.net/shijing266/article/details/50902785)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* *3* [判断String为空 StringUtils工具 isNotEmpty与isNotBlank区别](https://blog.csdn.net/qq_43842093/article/details/123909223)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文