请输入您要查询的百科知识:

 

词条 Module:Sandbox/28bytes/acm
释义

local p = {}

p.gettitle = function( frame )

local fmter = frame.args[1]

local base = frame.args[2]

local disam = frame.args[3]

if fmter == nil then

fmter = "" --optional

end

if base == nil or base == "" then

error("Missing/empty parameter; see module documentation for usage")

return ""

end

if disam == nil then

disam = "" --optional

end

local c = ""

if mw.ustring.find(fmter,"q") ~= nil then

c = "\\""

elseif mw.ustring.find(fmter,"t") ~= nil then

c = ""

end

local title = ""

if disam == "" then

title = c .. "" .. base .. "" .. c

else

title = "" .. c .. base .. c .. " " .. disam .. ""

end

local separator = " "

if mw.ustring.find(fmter,"o") ~= nil then

separator = separator .. "‹›"

end

if mw.ustring.find(fmter,"?") ~= nil then

separator = separator .. ""

end

if mw.ustring.find(fmter,"G") ~= nil then

separator = separator .. ""

end

return title .. separator .. " "

end

return p

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/9/21 18:54:25