str = "ImageSize: 128 pixels x 600 pixels: Formato BMP: Y es de una tia en Bolas"
t = DelimitedToTable(str,":")
if t then
txt ="";
for n,s in pairs(t) do
txt = txt..t[n].."\r\n"
end
end
Dialog.Message("Notice", txt);
str = "ImageSize: 128 pixels x 600 pixels: Formato BMP: Y es de una tia en Bolas"
t = DelimitedToTable(str,":")
if t then
txt ="";
for n,s in pairs(t) do
txt = txt..t[n].."\r\n"
end
end
Dialog.Message("Notice", txt);
function DelimitedToTable(s, d)
if not d or #d < 1 then return nil end
local tbl = {};
local sa = s;
local sD = "";
local nP = string.find(sa, d, 1, true)
while nP do
sD = string.sub(sa, 1, nP-1)
table.insert(tbl, #tbl+1, sD)
sa = string.sub(sa, nP+1, -1)
nP = string.find(sa, d, 1, true)
end
if sa ~= "" then table.insert(tbl, #tbl+1, sa) end
return tbl;
end