RT.
function explode(delimiter, text)
local list = {}; local pos = 1
if string.find("", delimiter, 1) then
return nil
end
while 1 do
local first, last = string.find(text, delimiter, pos)
if first then
table.insert(list, string.sub(text, pos, first-1))
pos = last+1
else
table.insert(list, string.sub(text, pos))
break
end
end
return list
end
function implode(delimiter, list)
local len = #list
if len == 0 then
return ""
end
local string = list[1]
if len > 1 then
for i = 2, len do
string = string .. delimiter .. list[i]
end
end
return string
end
thx.