Navigation menu

WoW:USERAPI tinsertbeforeval: Difference between revisions

Jump to navigation Jump to search
m
Move page script moved page USERAPI tinsertbeforeval to WoW:USERAPI tinsertbeforeval without leaving a redirect
(Added a short to tcount in case the specified table is an array.)
m (Move page script moved page USERAPI tinsertbeforeval to WoW:USERAPI tinsertbeforeval without leaving a redirect)
 
(One intermediate revision by one other user not shown)
Line 60: Line 60:
   -- tremovebyval: remove a table row given its value
   -- tremovebyval: remove a table row given its value
   function ''<PREFIX>''_tremovebyval(tab, val)
   function ''<PREFIX>''_tremovebyval(tab, val)
     for k,v in tab do
     for k,v in pairs(tab) do
       if(v==val) then
       if(v==val) then
         table.remove(tab, k);
         table.remove(tab, k);
Anonymous user