Skip to content

Instantly share code, notes, and snippets.

@Midiman
Created January 29, 2015 01:46
Show Gist options
  • Save Midiman/9e2f9b62bc551f4d8e25 to your computer and use it in GitHub Desktop.
Save Midiman/9e2f9b62bc551f4d8e25 to your computer and use it in GitHub Desktop.
require("io")
local characters = {
test = {
Jab = "true",
},
test2 = {
Jab = "false",
}
}
function string.split(delimiter, text)
local list = {}
local pos = 1
while 1 do
local first,last = string.find(text, delimiter, pos)
if first then
table.insert(list, string.sub(text, pos, first-1))
pos = last+1
else
table.insert(list, string.sub(text, pos))
break
end
end
return list
end
local input = string.split(" ", io.read())
for i = 1, #input do
print( string.format("%s",input[i]) )
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment