lua string类型 转 number类型

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/cn_yaojin/article/details/83383152
local start = "1"
local t = type(start)
    if t == "string" then
        --判断是string类型的话,转为number
        start= tonumber(start)
    end  

猜你喜欢

转载自blog.csdn.net/cn_yaojin/article/details/83383152