2022-12-20 [Ruby] 文字列の長さを調べる Ruby Ruby で文字列の長さを調べる方法です。 size メソッドを使うことで文字列の長さが Int で取得できます。 # 4 puts "Ruby".size docs.ruby-lang.org