I have a rails app in which users input numbers in large quantities. They often use the thousands delimiter (e.g. 1,000,000,000) to help keep their large numbers human-readable (I don't want to disallow delimiter because doing so would increase the chance of incorrect data).
ActiveSupport/Rails has the handy method number_with_delimiter
so that an int
1234567
is displayed as 1,234,567
. Is there a method to do the reverse?
note: I don't want to simply strip out a comma, since commas are used as a decimal point in many locales (e.g. European)