function StrSub(str, split)--字符串分割函数
local t, tmp = {}
for tmp in string.gmatch(str, "[^"..split.."]+") do
table.insert(t, tmp)
end
return t
end
A=StrSub("1--2---3----4","-")
输出后:
A[1]=1
A[2]=2
A[3]=3
A[4]=4
local t, tmp = {}
for tmp in string.gmatch(str, "[^"..split.."]+") do
table.insert(t, tmp)
end
return t
end
A=StrSub("1--2---3----4","-")
输出后:
A[1]=1
A[2]=2
A[3]=3
A[4]=4









