Jump to content

Module:Unihan pronunciation

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Northern Moonlight (talk | contribs) at 00:13, 3 January 2025 (Created page with 'local p = {} local unicode_data = require("Module:Unicode data/sandbox") --- @param text string function p.kCantonese(text) local result = {} for char in mw.text.gsplit(text, "", true) do local code = mw.ustring.codepoint(char) table.insert(result, unicode_data.lookup_kCantonese(code)) end return table.concat(result, " ") end return p'). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

local p = {}
local unicode_data = require("Module:Unicode data/sandbox")

--- @param text string
function p.kCantonese(text)
    local result = {}
    for char in mw.text.gsplit(text, "", true) do
        local code = mw.ustring.codepoint(char)
        table.insert(result, unicode_data.lookup_kCantonese(code))
    end
    return table.concat(result, " ")
end

return p