strtr_ctx

Translate substrings.

STRTR_CTX

NAME

strtr_ctx - Translate substrings.

SYNOPSIS

strtr_ctx(str,pairs)

PARAMETERS

str
The string being translated.
pairs
The context being translated to to.

RETURN

Returns the translated string.

EXAMPLES

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

SEE ALSO

{{ include("includes/strings.sn") }}

AUTHOR

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

MODIFICATIONS

1.0 2014-09-09 21:24:14 laplante@sednove.com

Edit

© 2024 extenso Inc. All rights reserved.