add apps module

This commit is contained in:
Evgeny
2021-08-19 15:41:40 +03:00
parent 5b8d6b57ff
commit f2e670b9a8
9 changed files with 77 additions and 8 deletions

View File

@@ -18,6 +18,17 @@ function string:replace(from, to)
return self:gsub(from, to)
end
function slice(tbl, s, e)
local pos, new = 1, {}
for i = s, e do
new[pos] = tbl[i]
pos = pos + 1
end
return new
end
function get_index(tab, val)
for index, value in ipairs(tab) do
if value == val then