Add defaultIfBlank similar to defaultIfEmpty to StringUtils -----------------------------------------------------------
Key: LANG-657 URL: https://issues.apache.org/jira/browse/LANG-657 Project: Commons Lang Issue Type: New Feature Components: lang.* Affects Versions: 2.5 Environment: n/a Reporter: Anthony Whitford Priority: Minor Similar to [StringUtils.defaultIfEmpty|http://commons.apache.org/lang/api-3.0-beta/org/apache/commons/lang3/StringUtils.html#defaultIfEmpty(T, T)], I'd like to also see a {{defaultIfBlank}} method: {code} public static String defaultIfBlank (final String str, final String defaultStr) { return StringUtils.isBlank(str) ? defaultStr : str; } {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.