Jump to content

ମଡ୍ୟୁଲ:FormatnumCleanup

ଉଇକିପିଡ଼ିଆ‌ରୁ

ବ୍ୟବହାର

[ସମ୍ପାଦନା]

{{Formatnum}} ପାଇଁ ସାମୟିକ ଭାବେ ବ୍ୟବହାର କରାଯାଉଛି ।

{{#invoke:FormatnumCleanup|main|8,9,9-670}} = 899670


local cleanup = {
   [','] = '',
   ['-'] = '',
}
 
-- a table to hold our function
local p = {}
 
-- function that converts strings using 'cleanup' local
function p.main(frame)
    local s = frame.args[1] -- This gets the first positional argument.
    for en, odia in pairs(cleanup) do -- This converts every string found in the table.
        s = mw.ustring.gsub(s, en, odia)
    end
    return s -- Get the result of the function.
end
 
return p -- Pass our table containing our function back to Lua.