查看“模块:TableUtil”的源代码
因为以下原因,您没有权限编辑本页:
您可以查看与复制此页面的源代码。
local lang = mw.getLanguage('en')
local p = {}
function p.generalLength(tbl)
local n = 0
for _, _ in pairs(tbl) do
n = n + 1
end
return n
end
function p.getKeysAndSort(tbl, f)
local ret = {}
for k, _ in pairs(tbl) do
ret[#ret+1] = k
end
table.sort(ret, f)
return ret
end
000
1:0
该页面使用的模板:
返回至模块:TableUtil。