table扩展模块添加clear方法

This commit is contained in:
MrZ626
2021-04-05 23:28:54 +08:00
parent 27075d1596
commit d4a29db051

View File

@@ -40,6 +40,13 @@ function TABLE.add(G,base)
end
end
--Clear the table
function TABLE.clear(G)
for k in next,G do
G[k]=nil
end
end
--For all things in G if no val in base, push to base
function TABLE.complete(G,base)
for k,v in next,G do