るりまサーチ (Ruby 2.5.0)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.050秒)

別のキーワード

  1. openssl integer
  2. asn1 integer
  3. _builtin integer
  4. integer rationalize
  5. integer times

ライブラリ

クラス

検索結果

String#length -> Integer (54730.0)

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

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

//emlist[例][ruby]{
"test".length # => 4
"test".size # => 4
"テスト".length # => 3
"テスト".size # => 3
"\x80\u3042".length # => 2
"\x80\u3042".size # => 2
//}

@see String#bytesize

String#size -> Integer (9430.0)

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

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

//emlist[例][ruby]{
"test".length # => 4
"test".size # => 4
"テスト".length # => 3
"テスト".size # => 3
"\x80\u3042".length # => 2
"\x80\u3042".size # => 2
//}

@see String#bytesize