模块:PageName:修订间差异
跳转到导航
跳转到搜索
建立内容为“p = {} function p.split(s) local parent, name parent, name = s:match("^(.+)/(.+)$") return parent, name end function p.parse(s) local type_flag,…”的新页面 |
小 已保护“模块:PageName”:高流量页面([编辑=仅允许管理员](无限期)[移动=仅允许管理员](无限期)) |
||
(没有差异)
| |||
2020年12月31日 (四) 20:54的版本
此模块的文档可以在模块:PageName/doc创建
p = {}
function p.split(s)
local parent, name
parent, name = s:match("^(.+)/(.+)$")
return parent, name
end
function p.parse(s)
local type_flag, full_name
type_flag, full_name = s:match("^([XW])/(.+)$")
if type_flag then
local base, sub
base, sub = p.split(full_name)
if base then
return type_flag, base, sub
else
return type_flag, full_name, nil
end
else
return nil, nil, s
end
end
return p