table扩展模块加入reIndex方法

This commit is contained in:
MrZ626
2021-03-08 10:50:45 +08:00
parent dfba194108
commit 22b4924b63

View File

@@ -1,4 +1,4 @@
local type=type
local next,type=next,type
local TABLE={}
function TABLE.shift(org)
local L={}
@@ -42,4 +42,11 @@ function TABLE.complete(G,base)--For all things in G if no val in base, push to
end
end
end
function TABLE.reIndex(org)
for k,v in next,org do
if type(v)=="string"then
org[k]=org[v]
end
end
end
return TABLE