Оказалось все не очень то и просто...
Код
function splithat(name)
local result = {"name","0","0","0","0"}
local delimiter = ","
local from = 1
local ind = 1
local delim_from, delim_to = string.find( name, delimiter, from )
if delim_from ~= nil then
while delim_from do
result[ind] = string.sub( name, from , delim_from-1 )
from = delim_to + 1
ind = ind + 1
delim_from, delim_to = string.find( name, delimiter, from )
end
result[ind] = string.sub( name, from )
end
return result
end
На выходе получается таблица из 5 значений...