[asterisk-users] Variable stripping/removing part of string

magnus.b at inputinterior.se magnus.b at inputinterior.se
Mon Apr 11 03:56:47 CDT 2011


I dont know if my mail client will keep formatting as I se it, but for me it sure looks like one space.
-- Executing [0424449631 at fax.inputinterior.se:4] NoOp("OOH323/Avaya2-109", "Martela (fax)") in new stack
                                                                                  xyz
-- Executing [0424449631 at fax.inputinterior.se:5] NoOp("OOH323/Avaya2-109", "Martela ") in new stack


-----Ursprungligt meddelande----- 
From: Tilghman Lesher 
Sent: Monday, April 11, 2011 10:15 AM 
To: Asterisk Users Mailing List - Non-Commercial Discussion 
Subject: Re: [asterisk-users] Variable stripping/removing part of string 

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

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110411/9d10910f/attachment.htm>


More information about the asterisk-users mailing list