http://codepad.org/wlMBsKIy
str = "Hello%world%foo%bar"
tbl = {}
str:gsub("[^%%]+", (function(word) table.insert(tbl, word) end))
or (in the form of a function)http://codepad.org/Q4QnRUyG
split_function = function(str)
local tbl = {}
str:gsub("[^%%]+", (function(word) table.insert(tbl, word) end))
return tbl
end


Posted by

