27 Aug
2017
27 Aug
'17
10 p.m.
On 08/27/2017 09:15 PM, Procházka Lukáš Ing. wrote:
Hello,
is there a built-in (Lua-?)numeric format to produce big numbers with spaces delimiting thousands (widely used for currencies)?
Hi Lukas, function comma_value(n) -- credit http://richard.warburton.it local left,num,right = string.match(n,'^([^%d]*%d)(%d*)(.-)$') return left..(num:reverse():gsub('(%d%d%d)','%1,'):reverse())..right end Copied from http://lua-users.org/wiki/FormattingNumbers. Just in case it helps, Pablo -- http://www.ousia.tk