Final Fantasy Wiki
Edit Page
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

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
Please note that all contributions to the Final Fantasy Wiki are considered to be released under the CC-BY-SA
Cancel Editing help (opens in new window)

Template used on this page:

  • Module:Table/doc (edit)