You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Benedikt Ritter (JIRA)" <ji...@apache.org> on 2013/05/12 11:03:16 UTC

[jira] [Commented] (LANG-892) Create a StringBuilderUtils.replaceAll function

    [ https://issues.apache.org/jira/browse/LANG-892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13655499#comment-13655499 ] 

Benedikt Ritter commented on LANG-892:
--------------------------------------

Hi Michael,

the usual way is to create a patch file against the latest trunk using svn diff (see http://svnbook.red-bean.com/en/1.7/svn.ref.svn.c.diff.html, but all the GUI tools can do the trick too). You have to attach the patch to this issue to grant the ASF the intellectual property of the code. And please don't forget to add some JUnit tests ;)

Thanks!
Benedikt 
                
> Create a StringBuilderUtils.replaceAll function
> -----------------------------------------------
>
>                 Key: LANG-892
>                 URL: https://issues.apache.org/jira/browse/LANG-892
>             Project: Commons Lang
>          Issue Type: Wish
>          Components: lang.*
>    Affects Versions: 3.2
>            Reporter: Michael Akerman
>              Labels: features, newbie
>             Fix For: 3.2
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> java.lang.StringBuilder doesn't have a very good replace function.
> I like using StringBuilderUtils.replaceAll when I want to do a lot of replacements on a single copy and not burn up a lot of memory creating new Strings for each replacement.
> I'm not familiar with how to offer this code the official way.  Here it is in pastebin:
> http://pastebin.com/fqKMJ4Y8

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira