table扩展模块添加clear方法
This commit is contained in:
@@ -40,6 +40,13 @@ function TABLE.add(G,base)
|
|||||||
end
|
end
|
||||||
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
|
--For all things in G if no val in base, push to base
|
||||||
function TABLE.complete(G,base)
|
function TABLE.complete(G,base)
|
||||||
for k,v in next,G do
|
for k,v in next,G do
|
||||||
|
|||||||
Reference in New Issue
Block a user