Jump to content

Module:ConvertDigits

ဝီကီးပီးဒီးယား က

Documentation for this module may be created at Module:ConvertDigits/doc

local p = {}

function p.to_en(frame)
    local text = frame.args[1] or ""

    local map = {
        ["၀"]="0", ["၁"]="1", ["၂"]="2",
        ["၃"]="3", ["၄"]="4", ["၅"]="5",
        ["၆"]="6", ["၇"]="7", ["၈"]="8",
        ["၉"]="9"
    }

    return (text:gsub("[၀-၉]", map))
end

return p