Answers for "how to convert string to number in lua"

Lua
1

lua string to number

local str = '10.7'
local num = tonumber(str)
Posted by: Guest on October-30-2020
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

Code answers related to "how to convert string to number in lua"

Browse Popular Code Answers by Language