diff options
author | spag <spag@golwen.net> | 2012-12-29 17:42:25 +0100 |
---|---|---|
committer | spag <spag@golwen.net> | 2012-12-29 17:42:25 +0100 |
commit | 929e7a391f139ed827e9bd3bea339789a82de6d4 (patch) | |
tree | 884b8e3b0f5b8b2b5f65788acaefe921256742c1 | |
parent | 8dad9594fbcc8c236a350266c4538a92eeae2772 (diff) |
support for numeric keys added
-rw-r--r-- | misc/freeswitch/scripts/common/str.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/misc/freeswitch/scripts/common/str.lua b/misc/freeswitch/scripts/common/str.lua index b19f299..ca6dcd9 100644 --- a/misc/freeswitch/scripts/common/str.lua +++ b/misc/freeswitch/scripts/common/str.lua @@ -7,6 +7,7 @@ module(...,package.seeall) function try(array, arguments) local argument = arguments:match('^(.-)%.') or arguments; local remaining_arguments = arguments:match('%.(.-)$'); + argument = tonumber(argument) or argument; if argument and type(array) == 'table' then if remaining_arguments then |