vl-string-translate

(vl-string-translate set1 set2 string)

The vl-string-translate function replaces characters of one set in a text string with characters of another set.

Arguments

set1 specifies a string of characters to be matched.

set2 specifies a string of characters to be substituted by those in set1.

string specifies a text string to be searched and translated.

Return Value

The function returns a text string with characters replaced if characters of set1 are found in it. If the number of charcters are not the same for set1 and set2, only the first characters from both sets are used (the extra ones with no pair are ignored).

Examples

: (vl-string-translate "94" "za" "pin 1994")

"pin 1zza"

: (vl-string-translate "aei" "y" "aeioua")

"yeiouy"