Files
rbot/lib/classes.rb
takumi091111 6781dff326 first commit
2017-09-25 09:38:07 +09:00

5 lines
88 B
Ruby

class String
def with_comma
self.gsub(/(\d)(?=\d{3}+$)/, '\\1,')
end
end