4件ヒット
[1-4件を表示]
(0.042秒)
検索結果
先頭4件
-
String
# length -> Integer (117439.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 (117439.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 -
Symbol
# length -> Integer (54421.0) -
シンボルに対応する文字列の長さを返します。
シンボルに対応する文字列の長さを返します。
(self.to_s.length と同じです。)
:foo.length #=> 3
@see String#length, String#size -
Symbol
# size -> Integer (54421.0) -
シンボルに対応する文字列の長さを返します。
シンボルに対応する文字列の長さを返します。
(self.to_s.length と同じです。)
:foo.length #=> 3
@see String#length, String#size