mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
When taking a substring and a negative length is provided, instead of just
ignoring it, allow this to mean that we want that many characters off of the end of the string so that ${EXTEN:0:$[${LEN(${EXTEN}) - 1]} can become ${EXTEN:0:-1}. (issue #7586, Corydon) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39659 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -139,8 +139,12 @@ previous example).
|
||||
;Save the numbers 555 to the 'number' variable
|
||||
exten => _9X.,1,Set(number=${EXTEN:-7:3})
|
||||
|
||||
If a negative length value is entered, it is ignored and Asterisk will match
|
||||
to the end of the string.
|
||||
If a negative length value is entered, Asterisk will remove that many characters
|
||||
from the end of the string.
|
||||
|
||||
;Set pin to everything but the trailing #.
|
||||
exten => _XXXX#,1,Set(pin=${EXTEN:0:-1})
|
||||
|
||||
___________________________
|
||||
EXPRESSIONS:
|
||||
---------------------------
|
||||
|
Reference in New Issue
Block a user