March 03, 2014

StringUtils.isNotEmpty() VS StringUtils.isNotBlank()


if(document.location.href.indexOf('stringutilsisnotempty') > -1) { // indexOf will return the position of the first occurence of this string in the url // or -1 it it's not there. document.location.href = 'https://blog.shanbhag.me/StringUtils-isNotEmpty-VS-StringUtils-isNotBlank/'; } StringUtils.isNotEmpty() is used to find if the String is not empty and not null.  StringUtils.isNotBlank()...

StringUtils.isEmpty() vs StringUtils.isBlank()


if(document.location.href.indexOf('stringutilsisempty') > -1) { // indexOf will return the position of the first occurence of this string in the url // or -1 it it's not there. document.location.href = 'https://blog.shanbhag.me/StringUtils-isEmpty-vs-StringUtils-isBlank/'; } StringUtils.isEmpty() is used to find if the String is length 0 or null. StringUtils.isBlank()...