function split(s)
local result = {}
for token in string.gmatch(s, "[^%s]+") do
table.insert(result, token)
end
return result
endtest run test run with input download show line numbers
Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Recognizer | Recognition Result | Visualize | Recalc |
|---|---|---|---|
| #308 | 146 | [visualize] |
| Snippet ID: | #125 |
| Snippet name: | Split string (around the spaces) |
| Eternal ID of this version: | #125/1 |
| Text MD5: | 432784f93c1b1486ea208505148b9fe9 |
| Author: | stefan |
| Category: | general lua functions |
| Type: | Lua code |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2014-01-11 04:09:04 |
| Source code size: | 146 bytes / 7 lines |
| Pitched / IR pitched: | Yes / Yes |
| Views / Downloads: | 1872 / 752 |
| Referenced in: | #3000382 - Answer for ferdie (>> t = 1, f = 0) |