summaryrefslogtreecommitdiff
path: root/misc/freeswitch
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-03-11 07:40:38 -0400
committerPeter Kozak <spag@golwen.net>2013-03-11 07:40:38 -0400
commit4496289be82f142ed9e739470c3a96edf5f2ec4e (patch)
tree9c14a7f444c786e2bfd9afaa699cbe039ea876bb /misc/freeswitch
parent62293482479ff51c5044f536aa2aae88e5117f46 (diff)
redundant functions removed
Diffstat (limited to 'misc/freeswitch')
-rw-r--r--misc/freeswitch/scripts/common/str.lua31
1 files changed, 0 insertions, 31 deletions
diff --git a/misc/freeswitch/scripts/common/str.lua b/misc/freeswitch/scripts/common/str.lua
index 541199f..0673421 100644
--- a/misc/freeswitch/scripts/common/str.lua
+++ b/misc/freeswitch/scripts/common/str.lua
@@ -4,37 +4,6 @@
module(...,package.seeall)
-function try(array, arguments)
- if type(arguments) ~= 'string' or type(array) ~= 'table' then
- return nil;
- end
-
- local result = array;
-
- arguments:gsub('([^%.]+)', function(entry)
- local success, result = pcall(function() result = (result[tonumber(entry) or entry]); end);
- end);
-
- return result;
-end
-
-
-function set(array, arguments, value)
- local nop, arguments_count = arguments:gsub('%.', '');
- local structure = array;
- arguments:gsub('([^%.]+)', function(entry)
- if arguments_count <= 0 then
- structure[entry] = value;
- elseif type(structure[entry]) == 'table' then
- structure = structure[entry];
- else
- structure[entry] = {};
- structure = structure[entry];
- end
- arguments_count = arguments_count - 1;
- end);
-end
-
-- to number
function to_n(value)
value = tostring(value):gsub('[^%d%.%+%-]', '');