Module:Convert to eastern arabic numerals: Difference between revisions

Content deleted Content added
No edit summary
Use gsub without loop
Line 12:
['8'] = '٨',
['9'] = '٩',
['%.'] = ','
}
 
Line 23:
end
local num_str = tostring(args[1])
forlocal westernnew_str, eastern_ in= pairsstring.gsub(num_str, '[0-9.]', conversion_table) do
return num_strnew_str
num_str = string.gsub(num_str, western, eastern)
end
return num_str
end