Answers for "lua string to number"

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

Browse Popular Code Answers by Language