Ruby 1.9.2 リファレンスマニュアル > ライブラリ一覧 > library _builtin > class String > length

instance method String#length

length -> Integer
size -> Integer

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

[SEE_ALSO] String#bytesize