some progress on the filter tab, various changes

This commit is contained in:
Manuel Simon Hirsig
2016-01-30 01:20:18 +01:00
parent 006b7a0582
commit 53935e9363
11 changed files with 366 additions and 292 deletions
+29
View File
@@ -344,3 +344,32 @@ function Aux.util.set()
return self
end
function public.join(array, separator)
local str = ''
for i, element in ipairs(array) do
if i > 1 then
str = str..separator
end
str = str..element
end
return str
end
function public.split(str, separator)
local array = {}
while true do
local start_index, _ = strfind(str, separator, 1, true)
if start_index then
local part = string.sub(str, 1, start_index - 1)
tinsert(array, part)
str = string.sub(str, start_index + 1, strlen(str))
else
local part = string.sub(str, 1, strlen(str))
tinsert(array, part)
return array
end
end
end