当前位置:网站首页>【转发】查看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
边栏推荐
- Five vuex plug-ins for your next vuejs project
- What is the difference between data scientists and machine learning engineers? - kdnuggets
- How to encapsulate distributed locks more elegantly
- Unity性能优化整理
- NLP model Bert: from introduction to mastery (2)
- Summary of common string algorithms
- [C / C + + 1] clion configuration and running C language
- 快速排序为什么这么快?
- Individual annual work summary and 2019 work plan (Internet)
- 游戏主题音乐对游戏的作用
猜你喜欢
一篇文章教会你使用Python网络爬虫下载酷狗音乐
每个前端工程师都应该懂的前端性能优化总结:
It's so embarrassing, fans broke ten thousand, used for a year!
Windows 10 tensorflow (2) regression analysis of principles, deep learning framework (gradient descent method to solve regression parameters)
Jetcache buried some of the operation, you can't accept it
一篇文章带你了解CSS3图片边框
C#和C/C++混合编程系列5-内存管理之GC协同
【自学unity2d传奇游戏开发】地图编辑器
Summary of common algorithms of binary tree
Python基础变量类型——List浅析
随机推荐
Analysis of ThreadLocal principle
ES6学习笔记(五):轻松了解ES6的内置扩展对象
6.3 handlerexceptionresolver exception handling (in-depth analysis of SSM and project practice)
What is the side effect free method? How to name it? - Mario
6.1.2 handlermapping mapping processor (2) (in-depth analysis of SSM and project practice)
Python + appium automatic operation wechat is enough
6.6.1 localeresolver internationalization parser (1) (in-depth analysis of SSM and project practice)
Uncle Bob: the software architecture is similar to a house. Object oriented is the structure of the house, and the water pipe is functional programming
一篇文章带你了解CSS对齐方式
Python filtering sensitive word records
理解格式化原理
Introduction to quantitative investment and Trading (Python introduction to financial analysis)
From zero learning artificial intelligence, open the road of career planning!
Vite + TS quickly build vue3 project and introduce related features
I'm afraid that the spread sequence calculation of arbitrage strategy is not as simple as you think
Do not understand UML class diagram? Take a look at this edition of rural love class diagram, a learn!
Python3 e-learning case 4: writing web proxy
Recommendation system based on deep learning
游戏主题音乐对游戏的作用
Natural language processing - BM25 commonly used in search