标签:end cti 理解 使用 转化 cal return ret 方法
__tostring,直接理解就是转化为string,把表转化为string,事实上也是这样,不过表转化为string的具体内容是自己定义的
模型:
table = setmetatable({},{__tostring =
function(table)
--这里写表变为string的具体内容,必须return出来
return
end
})
使用:local str = table
标签:end cti 理解 使用 转化 cal return ret 方法
原文地址:http://www.cnblogs.com/xzxdm/p/7524049.html