---@param n number
local function money_value(n, sep)
n = tostring(n)
sep = sep or ' '
local left,num,right = string.match(n,'^([^%d]*%d)(%d*)(.-)$')
print(left,num,right)
if not left or not num or not right then return n end
return left..(num:reverse():gsub('(%d%d%d)','%1'..sep):reverse())..right
end