Edit Page
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 17: | Line 17: | ||
function table.contains(a, b) |
function table.contains(a, b) |
||
for k,v in pairs(a) do if(v==b) then return true end end |
for k,v in pairs(a) do if(v==b) then return true end end |
||
− | return false |
||
− | end |
||
− | |||
− | function table.indexof(a, b) |
||
− | for k,v in pairs(a) do if(v==b) then return k end end |
||
return false |
return false |
||
end |
end |