当前位置:网站首页>【转发】查看lua中userdata的方法
【转发】查看lua中userdata的方法
2020-11-06 21:09:00 【蟑螂恶霸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)
版权声明
本文为[蟑螂恶霸L]所创,转载请带上原文链接,感谢
https://my.oschina.net/u/3983177/blog/4479871
边栏推荐
- Mac installation hanlp, and win installation and use
- 6.1.2 handlermapping mapping processor (2) (in-depth analysis of SSM and project practice)
- I'm afraid that the spread sequence calculation of arbitrage strategy is not as simple as you think
- Discussion on the development practice of aspnetcore, a cross platform framework
- Summary of common algorithms of binary tree
- What to do if you are squeezed by old programmers? I don't want to quit
- 6.2 handleradapter adapter processor (in-depth analysis of SSM and project practice)
- Analysis of partial source codes of qthread
- How to become a data scientist? - kdnuggets
- 6.3 handlerexceptionresolver exception handling (in-depth analysis of SSM and project practice)
猜你喜欢
01. SSH Remote terminal and websocket of go language
零基础打造一款属于自己的网页搜索引擎
A course on word embedding
前端都应懂的入门基础-github基础
Mongodb (from 0 to 1), 11 days mongodb primary to intermediate advanced secret
NLP model Bert: from introduction to mastery (1)
vue-codemirror基本用法:实现搜索功能、代码折叠功能、获取编辑器值及时验证
有了这个神器,快速告别垃圾短信邮件
一篇文章带你了解CSS3圆角知识
It's easy to operate. ThreadLocal can also be used as a cache
随机推荐
一篇文章带你了解CSS对齐方式
How to demote domain controllers and later in Windows Server 2012
前端未來趨勢之原生API:Web Components
Not long after graduation, he earned 20000 yuan from private work!
前端基础牢记的一些操作-Github仓库管理
一篇文章带你了解CSS 分页实例
Mongodb (from 0 to 1), 11 days mongodb primary to intermediate advanced secret
游戏主题音乐对游戏的作用
ES6学习笔记(五):轻松了解ES6的内置扩展对象
Recommendation system based on deep learning
这个项目可以让你在几分钟快速了解某个编程语言
How to encapsulate distributed locks more elegantly
What is the side effect free method? How to name it? - Mario
How to customize sorting for pandas dataframe
仅用六种字符来完成Hello World,你能做到吗?
6.6.1 localeresolver internationalization parser (1) (in-depth analysis of SSM and project practice)
For a while, a dynamic thread pool was created, and the source code was put into GitHub
6.1.1 handlermapping mapping processor (1) (in-depth analysis of SSM and project practice)
Advanced Vue component pattern (3)
What if the front end doesn't use spa? - Hacker News