This wiki has been automatically closed because there have been no edits or log actions made within the last 60 days. If you are a user (who is not the bureaucrat) that wishes for this wiki to be reopened, please request that at Requests for reopening wikis. If this wiki is not reopened within 6 months it may be deleted. Note: If you are a bureaucrat on this wiki, you can go to Special:ManageWiki and uncheck the "Closed" box to reopen it.Documentation for this module may be created at Module:SortItems/doc
local p = {}
local function _sortItems( nativeArgs, orderedList )
local sortedArgs = {}
local ord = 1
for iOrd, bOrd in ipairs(orderedList) do
for iNat, bNat in ipairs(nativeArgs) do
if bOrd == bNat then
-- add match to ordered list
sortedArgs[ord] = bNat
ord = ord + 1
break
end
end
if (not nativeArgs[ord] or nativeArgs[ord] =='' ) then
break -- found all arguments
end
end
return sortedArgs
end
