You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Henri Yandell (JIRA)" <ji...@apache.org> on 2006/06/08 10:45:31 UTC
[jira] Updated: (LANG-180) [lang] adding a StringUtils.replace
method that takes an array or List of replacement strings
[ http://issues.apache.org/jira/browse/LANG-180?page=all ]
Henri Yandell updated LANG-180:
-------------------------------
Bugzilla Id: (was: 36584)
Fix Version: 3.0
(was: 2.2)
I'm still undecided on this method so moving it with other new feature requests to 3.0.
> [lang] adding a StringUtils.replace method that takes an array or List of replacement strings
> ---------------------------------------------------------------------------------------------
>
> Key: LANG-180
> URL: http://issues.apache.org/jira/browse/LANG-180
> Project: Commons Lang
> Type: Improvement
> Environment: Operating System: other
> Platform: Other
> Reporter: Chris
> Priority: Minor
> Fix For: 3.0
> Attachments: StringUtilsAndText.java
>
> I have the situation where I have a String template with a dozen replacements
> I need to make. When I loop through and use StringUtils.replace each time, it
> has to make a StringBuffer of the whole template each time. I think we could
> make this more efficient if we had a replace() method which took an array of
> Strings to search for, and an array of Strings to replace with (or we could
> use a Collection or List or something). This way we could possibly do the
> replace in one StringBuffer result.
> One issue is if the replacement text has Strings to be replaced, do we iterate
> through again until there are no Strings to search for? Based on your
> replaceChars(String str, String searchChars, String replaceChars) method, I
> assume the answer is no, but we could have a boolean flag to have it both ways.
> I can write this for you if you are interested, please let me know.
> Thanks!
> Chris
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org