diff options
author | Russell Bryant <russell@russellbryant.com> | 2006-08-14 02:14:14 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2006-08-14 02:14:14 +0000 |
commit | 2f2cce01d252e6cff1f27cfe74912c3598dd7c0b (patch) | |
tree | dcf9f806e87c4dd39afe167ac5e8eec0555b694a /doc | |
parent | 781f9dbcaf983c9550eda7cdd4933432966f8ace (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: https://origsvn.digium.com/svn/asterisk/trunk@39659 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'doc')
-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: --------------------------- |