Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

isblank vs isempty java string utils

StringUtils.isBlank(null)      = true
 StringUtils.isBlank("")        = true  
 StringUtils.isBlank(" ")       = true  
 StringUtils.isBlank("bob")     = false  
 StringUtils.isBlank("  bob  ") = false
 
 StringUtils.isEmpty(null)      = true
 StringUtils.isEmpty("")        = true  
 StringUtils.isEmpty(" ")       = false  
 StringUtils.isEmpty("bob")     = false  
 StringUtils.isEmpty("  bob  ") = false
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #isblank #isempty #java #string #utils
ADD COMMENT
Topic
Name
4+5 =