此模块的文档可以在模块:PageName/doc创建
p = {} function p.split(s) local parent, name parent, name = s:match("^(.+)/(.+)$") return parent, name end local type2name = { ['W'] = "世界观", ['X'] = "联动" } function p.type_name(s) return type2name[s] 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 local base, sub base, sub = p.split(s) if base then return nil, base, sub else return nil, nil, s end end end return p