You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Jochen Kemnade (JIRA)" <ji...@apache.org> on 2015/08/04 09:29:05 UTC
[jira] [Commented] (GROOVY-7540) Add
StringGroovyMethods.collectReplacements(String, Map)
[ https://issues.apache.org/jira/browse/GROOVY-7540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14653199#comment-14653199 ]
Jochen Kemnade commented on GROOVY-7540:
----------------------------------------
If we allow strings as keys, this becomes difficult if the values "overlap":
{code}
"foobar".collectReplacements(["o":"a", "a":"o"]) // should become "faabor", not "foobor"
"foo".collectReplacements(["foo":"bar", "bar":"baz"]) // should become "bar"... I guess...
{code}
> Add StringGroovyMethods.collectReplacements(String, Map)
> --------------------------------------------------------
>
> Key: GROOVY-7540
> URL: https://issues.apache.org/jira/browse/GROOVY-7540
> Project: Groovy
> Issue Type: Improvement
> Reporter: Jochen Kemnade
> Priority: Minor
>
> It should be possible to use a map with {{collectReplacements}}, like in
> {code}
> "f006ar".collectReplacements(["0":"o", "6":"b"])
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)