19/12/20 14:24:42 A+TGdcd9.net
>>383
Ruby で、
ary = "MY FAVORITE SONGS".split.map( &:downcase ) # すべて小文字へ
puts ary.join( "_" ) #=> my_favorite_songs
puts ary.map( &:capitalize ).join #=> MyFavoriteSongs
puts ary.map.with_index { |word, idx|
if idx == 0
word # 最初だけ、そのまま
else
word.capitalize
end
}.join #=> myFavoriteSongs