Works! Thanks again!vrld wrote:Damnit. I hoped to avoid another gsub. This works, however:Code: Select all
string.format("%.2f", number):reverse():gsub("(%d%d%d)", "%1,"):reverse():gsub("^,?", "")
Formatting a number into #,###,###?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- Jasoco
- Inner party member
- Posts: 3725
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Formatting a number into #,###,###?
Who is online
Users browsing this forum: Ahrefs [Bot] and 69 guests