Short: New efun map_replace()
From: "Dale Perkins" <dale-perkins@home.com>
Date: Sun, 4 Jul 1999 03:33:13 -0500
Type: Feature
State: Unclassified

HI, I was wondering, could you implement an efun that would take a string
and a mapping as an arg and replace all occurrences of the keys of the
mapping in the string with the value of the key? something like
map_replace("a b c d", ([ "a" : "a", "c" : "2"])) would return "1 b 2 d"

This is very similar to what terminal_colour does but without the
delimiters.

Note: Internally this would probably be best solved with by creating
a pattern (key1)|(key2)|...), and looping calls to regexp() over the string,
analyzing the internal state of regexp() whenever it finds something.

