The difference between apache StringUtils blank and empty

StringUtils.isBlank(" ")       = true

StringUtils.isBlank("")        = true

 

 

 

StringUtils.isEmpty(" ")       = false

StringUtils.isEmpty("")        = true

 

 

-------

empy thinks that spaces also have content, so if spaces are not empty, it returns false, and blank is the other way around.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326714533&siteId=291194637