protect.split = function(str, sep) -- split function (make from string massive with separator select
local result = {}
local regex = ("([^%s]+)"):format(sep)
for each in str:gmatch(regex) do
table.insert(result, each)
end
return result
end
protect.includes = function(tbl, element, is_key) -- include function (return true if found "element" in "tbl"
for key, value in pairs(tbl) do
if is_key and key == element then return true end
if not is_key and value == element then return true end
end
return false
end