editors, Interface administrators, Administrators
1,788
edits
(Implementing merger with Module:Table) |
m (54 revisions imported from mw:Module:TableTools) |
||
(8 intermediate revisions by 8 users not shown) | |||
Line 304:
]]
function p.sortedPairs(t, keySort)
checkType('sortedPairs', 1, t, 'table')
checkType('sortedPairs', 2, keySort, 'function', true)
Line 427 ⟶ 426:
-- a different value when there are gaps in the array portion of the table.
-- Intended to be used on data loaded with mw.loadData. For other tables, use #.
-- Note: #frame.args in frame object always be set to 0, regardless of
-- the number of unnamed template parameters, so use this function for
-- frame.args.
--]]
function p.length(t)
local i =
i = i + 1
end
▲ until t[i] == nil
return i - 1
end
|