[SR-Users] pseudo variables in strings
Juha Heinanen
jh at tutpro.com
Sat Apr 2 10:09:07 CEST 2016
Alex Balashov writes:
> Yes, either by separating the PV elements, e.g.
>
> $var(x) = $fU + "abc";
Alex,
I cannot do that, because the string that contains pvs is result of
a dp_translate call.
> ... or with the newer $_s() PV created for this purpose:
>
> $var(x) = $_s($fUabc);
No luck with that either. This test
$var(pv_string) = "foo$var(pv)bar";
$var(pv) = "car";
$var(res_string) = $_s($var(pv_string));
xlog("L_INFO", "res_string is '$var(res_string)'\n");
produces to syslog:
Apr 2 11:07:26 lohi /usr/bin/sip-proxy[24536]: INFO: res_string is 'foo$var(pv)bar'
when I need to get 'foocarbar'.
-- Juha
More information about the sr-users
mailing list