Oct 31, 2018
Last updated
Was this helpful?
Last updated
Was this helpful?
Is a difference between the two (org.apache.commons.lang3.StringUtils.isBlank
andjava.lang.String.isEmpty
)?
checks that each character of the string is a whitespace character (or that the string is empty or that it's null). This is totally different than just checking if the string is empty.
eg:
StringUtils.isBlank:
StringUtils.isEmpty:
StringUtils.isEmpty checks for null
StringUtils.isBlank checks if text contains only white space char(s).