groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jochen Theodorou (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GROOVY-7540) Add StringGroovyMethods.collectReplacements(String, Map)
Date Thu, 06 Aug 2015 16:47:05 GMT

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

Jochen Theodorou commented on GROOVY-7540:
------------------------------------------

Can we really implement something like this {code:Java}
assert "ooaa".collectReplacements(["oo":"aa", "aa":"oo"])  == "aaoo"
assert "ooaa".collectReplacements(["aa":"oo", "oo":"aa"])  == "aaoo"
{code}
with String#replace? Or was that not a desired result?

> 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)

Mime
View raw message