-- Module:Ship prefix - testing module for existing template Ship prefix-- which give the len of certain ship prefixes??-- Created several tables in alphabetical order for easy viewing/editorial purposes-- Joined all the tables into one for processing-- Direct invoke: -- Template:Ship prefix--
local p =
function p.prefix(frame)
local prefix_list = local t1 = local t2 = local t3 = local t4 = local t5 = local t6 =
for k,v in ipairs(t1) do table.insert(prefix_list, v) end for k,v in ipairs(t2) do table.insert(prefix_list, v) end for k,v in ipairs(t3) do table.insert(prefix_list, v) end for k,v in ipairs(t4) do table.insert(prefix_list, v) end for k,v in ipairs(t5) do table.insert(prefix_list, v) end for k,v in ipairs(t6) do table.insert(prefix_list, v) end local prefix_len = 0 local shipname = "" shipname = frame.args[1] or "--" if shipname
"--" then prefix_len = 0 -- if shipname = "" prefix_len already set to 0 else shipname = (shipname:gsub("(%s.*)","")) for i,v in pairs(prefix_list) do if shipname
return prefix_len
end -- END FUNCTION prefix
return p