Hi thinkrichroy,
You can achieve this with the string.gmatch()
function like this :
function split (str, sep)
local sep = sep or "%s"
local result = { }
for word in str:gmatch("(%w+)"..sep.."?") do
table.insert(result, word)
end
return result
end
But I agree that a split function will be better and easier for newcomers. I will see if I can include it in LuaRT 1.8.0
PS : You can use string.gumatch()
to respect UTF8 encoding