table扩展模块加入reIndex方法
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user