[asterisk-users] Variable stripping/removing part of string
Tilghman Lesher
tilghman at meg.abyt.es
Mon Apr 11 03:15:04 CDT 2011
On Monday 11 April 2011 02:56:03 magnus.b at inputinterior.se wrote:
> It was a 1.8 but then we started to do a lot of development (ooh323) so
> today it is Asterisk SVN-may-ooh323_ipv6_direct_rtp-r311741MS-/trunk.
> Can hardly se that we have done any changes that would cause my
> "problem".
Are you sure there's only a single space separating the name from the
opening parenthesis? The :0:-1 nomenclature only removes a single
byte from the end, and if there was more than a single byte, that might
explain the difference. If that's the case, you may be forced to do a loop
to remove all trailing spaces, if that's still important:
While($["${foo:-1}" = " "])
Set(foo=${foo:0:-1})
EndWhile
--
Tilghman
More information about the asterisk-users
mailing list