Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function split(sep, st)
- local tab = {}
- local b = ""
- for i=0, #st do
- local let = string.sub(st, i, i)
- if let == sep then
- table.insert(tab, b)
- b = ""
- elseif i == #st then
- b = b..let
- table.insert(tab, b)
- b = ""
- else
- b = b..let
- end
- end
- return tab
- end
Advertisement
Add Comment
Please, Sign In to add comment