function

strtr_list . string . sncode

VERSIONlatest Translate substrings.

STRTR_LIST(1e)

NAME

strtr_list - Translate substrings.

SYNOPSIS

strtr_list(str,from,to)

DESCRIPTION

 

PARAMETERS

str
The string being translated.
from
The array being translated to to.
to
The array replacing from.

RETURN

Returns the translated string.

EXAMPLES

in:  res=<{strtr_list("aa123bb456xx789",["a","b","x"],["cc","ddd","yyyy"])}>.
out: res=cccc123dddddd456yyyyyyyy789.

in:  res=<{strtr_list("aa123bb456xx789",["a","b","x"],["cc","ddd","yyyy"])}>.
out: res=cccc123dddddd456yyyyyyyy789.

in:  res=<{strtr_list("hello world, hi hhh",["h","hi","hello"],["-","hello","hi"])}>.
out: res=hi world, hello ---.

in:  res=<{strtr_list("aa123bb456xx789",["a","b","x"],["cc","ddd","yyyy"])}>.
out: res=cccc123dddddd456yyyyyyyy789.

AUTHOR

Written by Pusnei Sergey, <sergey@sednove.com>