Posted 28 July 2015 - 11:58 PM
I've been working on a function called "parse(_line)", but NOTHING I've done works.
Any suggestions?
Any suggestions?
local function parse( str )
local t = {}
for word in str:gmatch( "%S+" ) do
t[ #t + 1 ] = word
end
return t
end
Thanks!I'm unsure of what you want, do you want a sentence separated into words?local function parse( str ) local t = {} for word in str:gmatch( "%S+" ) do t[ #t + 1 ] = word end return t end