lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Let's say I have following string in variable s:

s="abc 5 def 67 0.666"

I want to create following table from it:

t={"abc",5,"def",67,0.666}

What is simplest way to do it in Lua? In Python there is predefined function to
split string, must I write one for Lua myself?

-- 
Free Software - find interesting programs and change them
NetHack - meet interesting creatures, kill them and eat their bodies
Usenet - meet interesting people from all over the world and flame them
Decopter - unrealistic helicopter simulator, get it from http://decopter.sf.net