Advertisement
An_random_user

utils

Jan 6th, 2024
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. function split(inputstr, sep)
  2. if sep == nil then
  3. sep = "%s"
  4. end
  5. local t={}
  6. for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
  7. table.insert(t, str)
  8. end
  9. return t
  10. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement