Module:Utils: Difference between revisions
CompactStar (talk | contribs) Adding get_monzo to utils since I think it is useful for multiple modules |
CompactStar (talk | contribs) No edit summary |
||
Line 208: | Line 208: | ||
end | end | ||
-- Check if a table contains x | |||
local function table_contains(tbl, x) | |||
found = false | |||
for _, v in pairs(tbl) do | |||
if v == x then | |||
found = true | |||
end | |||
end | |||
return found | |||
end | |||
return p | return p |