Aller au contenu

Module:Lien frontière

Une page de Wikipédia, l'encyclopédie libre.
Ceci est une version archivée de cette page, en date du 19 octobre 2017 à 06:23 et modifiée en dernier par Od1n (discuter | contributions) (http://www.luafaq.org/gotchas.html#T8.1). Elle peut contenir des erreurs, des inexactitudes ou des contenus vandalisés non présents dans la version actuelle.

 Documentation[créer] [purger]
local p = {}

function p.traitePrefixe(frame)
    local result, count = frame.args[1]
        :gsub('Drapeau de ', '')
        :gsub('Drapeau du ', 'le ')
        :gsub('Drapeau des ', 'les ')
    return result
end

--[[
function that compare two string as plain text.
]]
function p.compare(frame)
	local a = frame.args[1]
	local b = frame.args[2]
    if a >  b then return -1 end
    if a <  b then return 1 end
    return 0
end

function p.minimum(frame)
	local a = frame.args[1]
	local b = frame.args[2]
    if a >  b then return b else return a end
end

function p.maximum(frame)
	local a = frame.args[1]
	local b = frame.args[2]
    if a >=  b then return a else return b end
end

return p