Lua分割字符串
--按照指定符号分割字符串
function strSplit(str, symbol)
local t = {}
--按照symbol分割字符串
for w in string.gmatch(str,"([^'" .. symbol .. "']+)") do
table.insert(t, w)
end
return t
end
--按照指定符号分割字符串
function strSplit(str, symbol)
local t = {}
--按照symbol分割字符串
for w in string.gmatch(str,"([^'" .. symbol .. "']+)") do
table.insert(t, w)
end
return t
end