Returns either the passed in CharSequence, or if the CharSequence is whitespace, empty ("") or null, the value of defaultStr. StringUtils.defaultIfBlank(null, "NULL") = "NULL" StringUtils.defaultIfBlank("", "NULL") = "NULL" StringUtils.defaultIfBlank(" ", "NULL")
(String str, String defaultStr)
| 214 | * @see StringUtils#defaultString(String, String) |
| 215 | */ |
| 216 | public static String defaultIfBlank(String str, String defaultStr) { |
| 217 | return StringUtils.isBlank(str) ? defaultStr : str; |
| 218 | } |
| 219 | |
| 220 | // Empty checks |
| 221 | // ----------------------------------------------------------------------- |
no test coverage detected