跳去內容

模組:ustring

來自維基辭典

呢個模組嘅解說可以喺模組:ustring/doc度開

local export = {}
local title = mw.title.getCurrentTitle()
function export.codepoint()
	local codepoint
	if mw.ustring.len(title.fullText) == 1 then
		codepoint = mw.ustring.codepoint(title.fullText)
		codepoint = string.format("%4X", codepoint)
	else
		if title.nsText == "模" or title.nsText == "模組" then return "" end
		error("Page title is not a single Unicode character")
	end
	return codepoint
end
function export.show(frame)
	if frame.args[1] == "codepoint" then
		return export.codepoint()
	end
end
return export