文字列をすべて小文字に変換する


Rubyにおいて文字列を小文字に変換するにはdowncaseメソッドを利用します。

str = 'Hello'
print str.downcase

出力

hello