Created
July 8, 2019 12:13
-
-
Save isuke/efe5dc02b70fc347036398696cddf4d2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12345678.to_s.reverse.scan(/.{1,3}/).join(',').reverse # => "12,345,678" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment