Module:Character Infobox

From the Aadenboy Wiki
Jump to navigation Jump to search

Documentation for this module may be created at Module:Character Infobox/doc

local p = {}

function p.pedalCats(frame)
	local pedality = frame.args[1] or ""
	local cats = ""
	for n in pedality:gmatch("%w+peda?l?") do
		cats = cats.."[[Category:"..n:sub(1, 1):upper()..n:sub(2):lower()..(n:sub(-2) == "al" and "" or "al").."]]"
	end
	return cats
end

return p