php has the strtr function:
strtr(\'aa-bb-cc\', array(\'aa\' => \'bbz\', \'bb\' => \'x\', \'cc\' => \'y\')); # bbz-x-y
It replace
str.translate is the equivalent, but can only map to single characters.