class String
Public Instance Methods
commify(delimiter=',')
click to toggle source
commify¶ ↑
Taken from codesnippets.joyent.com/posts/show/330
# File lib/image_paradise/graphs/base.rb, line 1388 def commify(delimiter=',') self.gsub(/(\d)(?=(\d\d\d)+(?!\d))/, "\\1#{delimiter}") end