Answers for "string to int lua"

1

lua string to number

local str = '10.7'
local num = tonumber(str)
Posted by: Guest on October-30-2020
1

tointeger lua

local a = "5"

local numbera = tonumber(a) --is now an integer
Posted by: Guest on April-14-2021
1

string to int lua

local a = "10"
print(type(a))
local num = tonumber(a)
print(type(num))
Posted by: Guest on July-15-2021

Browse Popular Code Answers by Language