当前位置:网站首页>[forward] how to view UserData in Lua
[forward] how to view UserData in Lua
2020-11-06 21:09:00 【Cockroach bully L】
local function printMetaTableFun(t)
local rs_tb={}
local function tmp(t)
if t then
for _val, _val_type in pairs(t) do
if type(_val_type)~="userdata" then
if not string.find(_val,"_") then
table.insert(rs_tb,_val)
end
end
end
local ft=getmetatable(t)
if ft then
tmp(ft)
end
end
end
tmp(getmetatable(t))
table.sort(rs_tb)
local rs_str=""
for i=1,#rs_tb do
rs_str=rs_str .. rs_tb[i] .. "\n"
end
print(rs_str)
end
printMetaTableFun(touch)
版权声明
本文为[Cockroach bully L]所创,转载请带上原文链接,感谢
边栏推荐
猜你喜欢
Git rebase is in trouble. What to do? Waiting line
The importance of big data application is reflected in all aspects
jenkins安装部署过程简记
华为Mate 40 系列搭载HMS有什么亮点?
Contract trading system development | construction of smart contract trading platform
Staying up late summarizes the key points of report automation, data visualization and mining, which is different from what you think
What kind of music do you need to make for a complete game?
Why is the LS command stuck when there are too many files?
What are manufacturing and new automation technologies?
GUI engine evaluation index
随机推荐
IPFs rudder filecoin landing at the same time, fil currency price broke a thousand
PHP application docking justswap special development kit【 JustSwap.PHP ]
GUI engine evaluation index
Tron smart wallet PHP development kit [zero TRX collection]
【字节跳动 秋招岗位开放啦】Ohayoo!放学别走,我想约你做游戏!!!
ES6 learning notes (2): teach you to play with class inheritance and class objects
Digital city responds to relevant national policies and vigorously develops the construction of digital twin platform
解决 WPF 绑定集合后数据变动界面却不更新的问题
Using an example to understand the underlying processing mechanism of JS function
代码重构之法——方法重构分析
The native API of the future trend of the front end: web components
Helping financial technology innovation and development, atfx is at the forefront of the industry
Those who have worked in China for six years and a million annual salary want to share these four points with you
Gather in Beijing! The countdown to openi 2020
嘉宾专访|2020 PostgreSQL亚洲大会阿里云数据库专场:王涛
2020-08-19:TCP是通过什么机制保障可靠性的?
大会倒计时|2020 PostgreSQL亚洲大会-中文分论坛议程安排
mongo 用户权限 登录指令
Unity performance optimization
Contract trading system development | construction of smart contract trading platform