function string.split(s, p)
if s == nil then
return nil;
end
if p == nil then
return s;
end
local rt= {};
s = tostring(s);
string.gsub(s, '[^'..p..']+', function(w) table.insert(rt, w) end );
return rt;
end
if s == nil then
return nil;
end
if p == nil then
return s;
end
local rt= {};
s = tostring(s);
string.gsub(s, '[^'..p..']+', function(w) table.insert(rt, w) end );
return rt;
end