Pinkishu

Untitled

Jul 22nd, 2012
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function split(str,sep)
  2.   local tab = {}
  3.   local find,send = string.find(str.."",sep)
  4.   while find do
  5.     print(str.."/"..find.."/"..send)
  6.     table.insert(tab,string.sub(0,find-1))
  7.     str = string.sub(str,find+1)
  8.     find,send = string.find(str.."",sep)
  9.   end
  10. end
  11.  
  12. split("3:5:5",":")
Advertisement
Add Comment
Please, Sign In to add comment