Module:TableTools: Difference between revisions
Content deleted Content added
Caleb Cooper (talk | contribs) Created page with "--[[ ------------------------------------------------------------------------------------ -- TableTools --..." |
Caleb Cooper (talk | contribs) No edit summary |
||
| (4 intermediate revisions by 3 users not shown) | |||
Line 30:
--]]
function p.isPositiveInteger(v)
return false
end
Line 44 ⟶ 48:
--]]
function p.isNan(v)
return true
else
return false
end
end
Line 414 ⟶ 422:
--[[
--
-- 1 such that t[n + 1] is nil. It is similar to the operator #, but may return▼
▲-- It is similar to the operator #, but may return
-- 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 #.
Line 423 ⟶ 430:
-- frame.args.
--]]
▲function p.length(t, prefix)
while t[i] ~= nil do
end
return i - 1
▲ local key
▲ else
▲ key = i
▲ end
▲ return t[key] ~= nil
end
function p.inArray(arr, valueToFind)
checkType("inArray", 1, arr, "table")
| |||