1999-07-16 大文字・小文字の変換 Ruby 明解C言語 入門編 > 9. 文字列の基本 > 大文字・小文字の変換 Ruby str = "BohYoh" str = str.upcase print "大文字:#{str}\n" str = str.downcase print "小文字:#{str}\n" str.upcase! print "大文字:#{str}\n" 実行結果 L:\>ruby l:\lesson_09_076.rb 大文字:BOHYOH 小文字:bohyoh 大文字:BOHYOH