You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Anthony Whitford (JIRA)" <ji...@apache.org> on 2010/11/13 00:56:23 UTC
[jira] Created: (LANG-657) Add defaultIfBlank similar to
defaultIfEmpty to StringUtils
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.
[jira] Closed: (LANG-657) Add defaultIfBlank similar to
defaultIfEmpty to StringUtils
Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LANG-657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henri Yandell closed LANG-657.
------------------------------
Resolution: Duplicate
Went in 10 days ago :)
LANG-655, r1030830.
> 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.