Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

7
LINES

< > BotCompany Repo | #125 // Split string (around the spaces)

Lua code

function split(s)
  local result = {}
  for token in string.gmatch(s, "[^%s]+") do
    table.insert(result, token)
  end
  return result
end

test run  test run with input  download  show line numbers   

Relations

Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Image recognition results

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: 1459 / 638
Referenced in: [show references]