Related questions
Split string in Lua?
I need to do a simple split of a string, but there doesn't seem to be a function for this, and the manual way I tested didn't seem to work. How would I do it?
Lua string to int
How can I convert a string to an integer in Lua?
I have a string like this:
a = "10"
I would like it to be converted to 10, the number.
How to get number of entries in a Lua table?
Sounds like a "let me google it for you" question, but somehow I can't find an answer. The Lua # operator only counts entries with integer keys, and so does table.getn:
tbl = {}
tbl["test"] = 47
tbl[1] = 48
print(#tbl, table.getn(tbl)) …