SHOW:
|
|
- or go back to the newest paste.
1 | function split(str,sep) | |
2 | local tab = {} | |
3 | - | local find,send = string.find(str,sep) |
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) |
8 | + | find,send = string.find(str.."",sep) |
9 | end | |
10 | end | |
11 | ||
12 | split("3:5:5",":") |