Modulo:Sandbox/Lucamauri/modulotest: differenze tra le versioni

Da Wikitrek.
Vai alla navigazione Vai alla ricerca
Nessun oggetto della modifica
Nessun oggetto della modifica
Riga 11: Riga 11:
function p.toglitag(testo)
function p.toglitag(testo)
     first = string.gsub(testo.args[1], "<" .. testo.args[2] .. ">", "")
     first = string.gsub(testo.args[1], "<" .. testo.args[2] .. ">", "")
     return string.gsub(first, "</" .. testo.args[2] .. ">", "")
     return (string.gsub(first, "</" .. testo.args[2] .. ">", ""))
end
end
return (p)
return p

Versione delle 16:09, 12 set 2018

La documentazione per questo modulo può essere creata in Modulo:Sandbox/Lucamauri/modulotest/man

--[[
local p = {}
function p.hello(frame)
    return 'Hello'
end
return p
]]--

local p = {}
local first = {}
function p.toglitag(testo)
    first = string.gsub(testo.args[1], "<" .. testo.args[2] .. ">", "")
    return (string.gsub(first, "</" .. testo.args[2] .. ">", ""))
end
return p