当前位置:网站首页>【转发】查看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
边栏推荐
- Construction of encoder decoder model with keras LSTM
- axios学习笔记(二):轻松弄懂XHR的使用及如何封装简易axios
- 有了这个神器,快速告别垃圾短信邮件
- The choice of enterprise database is usually decided by the system architect - the newstack
- Python + appium automatic operation wechat is enough
- Free patent download tutorial (HowNet, Espacenet)
- TensorFlow中的Tensor是什么?
- Classical dynamic programming: complete knapsack problem
- Recommendation system based on deep learning
- 快速排序为什么这么快?
猜你喜欢
How to use Python 2.7 after installing anaconda3?
一篇文章带你了解CSS3图片边框
零基础打造一款属于自己的网页搜索引擎
How to customize sorting for pandas dataframe
Python Jieba segmentation (stuttering segmentation), extracting words, loading words, modifying word frequency, defining thesaurus
[C / C + + 1] clion configuration and running C language
Network security engineer Demo: the original * * is to get your computer administrator rights! [maintain]
Word segmentation, naming subject recognition, part of speech and grammatical analysis in natural language processing
NLP model Bert: from introduction to mastery (1)
Cglib 如何实现多重代理?
随机推荐
Interpretation of Cocos creator source code: engine start and main loop
vue-codemirror基本用法:实现搜索功能、代码折叠功能、获取编辑器值及时验证
It's so embarrassing, fans broke ten thousand, used for a year!
vue任意关系组件通信与跨组件监听状态 vue-communication
Network security engineer Demo: the original * * is to get your computer administrator rights! [maintain]
Common algorithm interview has been out! Machine learning algorithm interview - KDnuggets
小游戏云开发入门
6.1.2 handlermapping mapping processor (2) (in-depth analysis of SSM and project practice)
理解格式化原理
Humor: hacker programming is actually similar to machine learning!
Vite + TS quickly build vue3 project and introduce related features
6.4 viewresolver view parser (in-depth analysis of SSM and project practice)
前端工程师需要懂的前端面试题(c s s方面)总结(二)
Chainlink brings us election results into blockchain everipedia
5.5 controlleradvice notes - SSM in depth analysis and project practice
一篇文章带你了解CSS3 背景知识
How to use parameters in ES6
Python filtering sensitive word records
Python3 e-learning case 4: writing web proxy
Brief introduction of TF flags