gsubがブロック受けれるの今更ながらに知ったのでメモ
list = ['AlphaBeta', 'FooBar']
# => ["AlphaBeta", "FooBar"]
list.map { |item| item.gsub(/^[A-Z]/) { |i| i.downcase } }
# => ["alphaBeta", "fooBar"]
Go to list of users who liked
More than 1 year has passed since last update.
gsubがブロック受けれるの今更ながらに知ったのでメモ
list = ['AlphaBeta', 'FooBar']
# => ["AlphaBeta", "FooBar"]
list.map { |item| item.gsub(/^[A-Z]/) { |i| i.downcase } }
# => ["alphaBeta", "fooBar"]
Register as a new user and use Qiita more conveniently
Go to list of users who liked