table扩展模块加入reIndex方法
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
local type=type
|
local next,type=next,type
|
||||||
local TABLE={}
|
local TABLE={}
|
||||||
function TABLE.shift(org)
|
function TABLE.shift(org)
|
||||||
local L={}
|
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
|
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
|
return TABLE
|
||||||
Reference in New Issue
Block a user