函数:type 判断数据类型
函数名称:判断数据类型
函数名称:判断数据类型
函数方法
bool = type(str)
必填
参数 | 说明 |
---|---|
str | 需要判断的数据 |
选填
无
返回值
返回值 | 说明 |
---|---|
bool | 数据类型:"number"、"string"、"boolean"、"table"、"function"、"thread"、"userdata" |
函数用例
num=111
str = tostring(num)
nLog("转换后的内容:"..str.."\r\n".."数据类型:"..type(str))