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? 17 Answers 17
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? 17 Answers 17
I am confused about the difference between function calls via . and via : > x = {foo = function(a,b) return a end, bar = function(a,b) return b end, } > return x.foo(3,4) 3 > return x.bar(3,4) 4 > return x:foo(3,4) table: 0x10a120 > return x:bar(3,4) 3 What is the : doing ? 3 Answers … Read more
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. 14 Answers 14