မဝ်ဂျူ:mul-domino def
မံက်ပြာကတ်
Documentation for this module may be created at မဝ်ဂျူ:mul-domino def/doc
local m_unicode = require('Module:Unicode data')
local export = {}
function export.definition(frame)
local pageObject = mw.title.getCurrentTitle()
local pageName = pageObject.text
local codepoint = mw.ustring.codepoint(pageName)
local characterName = m_unicode.lookup_name(codepoint)
local offset = mw.ustring.find(characterName, "%-")
local dominoes = {}
if mw.ustring.len(pageName) == 1 then
dominoes[1] = mw.ustring.sub (characterName, offset+2, offset+2)
dominoes[2] = mw.ustring.sub (characterName, offset+5, offset+5)
else
dominoes[1] = "a"
dominoes[2] = "b"
end
local definition = "A [[domino]] [[tile]], the [[" .. dominoes[1] .. "]]-[[" .. dominoes[2] .. "]]."
local category = " "
local result = definition .. category
result = frame:expandTemplate { title = "n-g", args = { result } }
return result
end
return export