Rubyで 1234567を1,234,567と出力したい。
require 'active_support'
require 'active_support/core_ext'
puts 1234567.to_s(:delimited) # 1,234,567
(requireは2つとも必要)
詳しくは
https://rip.hibariya.org/post/ruby-activesupport-to-s-args/
参照して下さい。
Go to list of users who liked
More than 1 year has passed since last update.
Rubyで 1234567を1,234,567と出力したい。
require 'active_support'
require 'active_support/core_ext'
puts 1234567.to_s(:delimited) # 1,234,567
(requireは2つとも必要)
詳しくは
https://rip.hibariya.org/post/ruby-activesupport-to-s-args/
参照して下さい。
Register as a new user and use Qiita more conveniently
Go to list of users who liked