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

Paul King edited comment on GROOVY-7540 at 8/5/15 12:19 PM:
------------------------------------------------------------

Perhaps the existing {{tr}} method is good enough for the one character map 
example you gave earlier?
{code}
assert 'foobar'.tr('oa', 'ao') == 'faabor'
{code}



was (Author: paulk):
Perhaps the existing {{tr}} method is good enough?
{code}
assert 'foobar'.tr('oa', 'ao') == 'faabor'
{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)

Reply via email to