Ruby 2.1.0 リファレンスマニュアル > ライブラリ一覧 > 組み込みライブラリ > Stringクラス > length

instance method String#length

length -> Integer[permalink][rdoc]
size -> Integer

文字列の文字数を返します。バイト数を知りたいときは bytesize メソッドを使ってください。

[SEE_ALSO] String#bytesize