Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function split(str, sep)
- if sep == nil then
- sep = "%s"
- end
- local t = {}
- for str in string.gmatch(str, "([^"..sep.."]+)") do
- table.insert(t, str)
- end
- return t
- end
- return { split = split }
Advertisement
Add Comment
Please, Sign In to add comment