Module:Convert to eastern arabic numerals: Difference between revisions

Content deleted Content added
No edit summary
m Comma "," (U+002C) → Arabic Decimal Separator "٫" (U+066B)
 
(4 intermediate revisions by one other user not shown)
Line 12:
['8'] = '٨',
['9'] = '٩',
['%.'] = ',٫'
}
 
Line 19:
return 'Error! Arguments provided are null'
end
if args[1] == nil then
local num_str = tostring(args[1])
return ''
for western, eastern in pairs(conversion_table) do
num_str = string.gsub(num_str, western, eastern)
end
returnlocal num_str = tostring(args[1])
local new_str, _ = string.gsub(num_str, '[0-9.]', conversion_table)
return new_str
end