From 22b4924b632612b250f8c67c32c0df9fc2a466b5 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Mon, 8 Mar 2021 10:50:45 +0800 Subject: [PATCH] =?UTF-8?q?table=E6=89=A9=E5=B1=95=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E5=8A=A0=E5=85=A5reIndex=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/tableExtend.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Zframework/tableExtend.lua b/Zframework/tableExtend.lua index 9258709d..120241fd 100644 --- a/Zframework/tableExtend.lua +++ b/Zframework/tableExtend.lua @@ -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 \ No newline at end of file