Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function split(str,delim)
- local ret = {}
- while true do
- local s,e = string.find(str,delim,1,true)
- print("STR: "..str)
- print(s.."/"..e)
- if s and e then
- table.insert(ret,string.sub(str,1,s-1))
- str = string.sub(str,e+1)
- print(str)
- else
- break
- end
- end
- return ret
- end
Advertisement
Add Comment
Please, Sign In to add comment