diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-08-14 02:14:14 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-08-14 02:14:14 +0000 |
commit | 02ed9fcda9904ece63bbd064327993ef542c61fd (patch) | |
tree | dcf9f806e87c4dd39afe167ac5e8eec0555b694a /doc/channelvariables.txt | |
parent | 6587d2ab753f064b0ec1c7ccfe246b964adf8c81 (diff) |
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: http://svn.digium.com/svn/asterisk/trunk@39659 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'doc/channelvariables.txt')
-rw-r--r-- | doc/channelvariables.txt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/doc/channelvariables.txt b/doc/channelvariables.txt index 4de93e7dd..061fa4261 100644 --- a/doc/channelvariables.txt +++ b/doc/channelvariables.txt @@ -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: --------------------------- |