当前位置:网站首页>【转发】查看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
边栏推荐
- Analysis of partial source codes of qthread
- 前端工程师需要懂的前端面试题(c s s方面)总结(二)
- [JMeter] two ways to realize interface Association: regular representation extractor and JSON extractor
- [C] (original) step by step teach you to customize the control element - 04, ProgressBar (progress bar)
- 教你轻松搞懂vue-codemirror的基本用法:主要实现代码编辑、验证提示、代码格式化
- 一部完整的游戏,需要制作哪些音乐?
- Simple summary of front end modularization
- Summary of common algorithms of linked list
- Python3 e-learning case 4: writing web proxy
- [C / C + + 1] clion configuration and running C language
猜你喜欢
It's so embarrassing, fans broke ten thousand, used for a year!
Python基础数据类型——tuple浅析
给字节的学姐讲如何准备“系统设计面试”
FastThreadLocal 是什么鬼?吊打 ThreadLocal 的存在!!
一部完整的游戏,需要制作哪些音乐?
Named entity recognition in natural language processing: tanford core LP ner (1)
JVM memory area and garbage collection
Brief introduction and advantages and disadvantages of deepwalk model
Linked blocking Queue Analysis of blocking queue
A brief history of neural networks
随机推荐
axios学习笔记(二):轻松弄懂XHR的使用及如何封装简易axios
How to customize sorting for pandas dataframe
Five vuex plug-ins for your next vuejs project
The data of pandas was scrambled and the training machine and testing machine set were selected
一篇文章带你了解CSS3图片边框
6.3 handlerexceptionresolver exception handling (in-depth analysis of SSM and project practice)
Do not understand UML class diagram? Take a look at this edition of rural love class diagram, a learn!
5.4 static resource mapping
Not long after graduation, he earned 20000 yuan from private work!
Natural language processing - BM25 commonly used in search
Summary of common algorithms of binary tree
Our best practices for writing react components
6.6.1 localeresolver internationalization parser (1) (in-depth analysis of SSM and project practice)
Music generation through deep neural network
Word segmentation, naming subject recognition, part of speech and grammatical analysis in natural language processing
一路踩坑,被迫聊聊 C# 代码调试技巧和远程调试
大道至简 html + js 实现最朴实的小游戏俄罗斯方块
6.1.1 handlermapping mapping processor (1) (in-depth analysis of SSM and project practice)
[JMeter] two ways to realize interface Association: regular representation extractor and JSON extractor
[event center azure event hub] interpretation of error information found in event hub logs