1124件ヒット
[1-100件を表示]
(0.065秒)
別のキーワード
クラス
-
ARGF
. class (12) - Array (468)
- CGI (12)
-
CSV
:: Table (24) - File (12)
- Integer (24)
- MatchData (48)
-
Net
:: HTTPGenericRequest (24) - Range (92)
- String (24)
- Thread (24)
モジュール
- Enumerable (252)
-
Net
:: HTTPHeader (108)
キーワード
- [] (96)
- []= (36)
- at (12)
-
backtrace
_ locations (24) -
bit
_ length (12) -
body
_ stream (12) -
body
_ stream= (12) - chunk (12)
-
chunk
_ while (12) - combination (24)
-
content
_ length (12) -
content
_ length= (12) - delete (12)
- fetch (36)
- fill (72)
-
get
_ fields (12) - header (12)
- max (82)
-
max
_ by (48) - min (82)
-
min
_ by (48) - minmax (36)
-
minmax
_ by (24) - none? (45)
- one? (45)
- permutation (24)
-
range
_ length (12) - read (12)
-
repeated
_ combination (24) -
repeated
_ permutation (24) - sample (48)
- size (36)
-
slice
_ before (24) -
slice
_ when (12) -
sort
_ by! (24) - sum (18)
- truncate (12)
検索結果
先頭5件
-
String
# length -> Integer (18232.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... -
CSV
:: Table # length -> Integer (18226.0) -
(ヘッダを除く)行数を返します。
...(ヘッダを除く)行数を返します。
Array#length, Array#size に委譲しています。
//emlist[][ruby]{
require 'csv'
csv = CSV.new("a,b,c\n1,2,3", headers: true)
table = csv.read
p table.size # => 1
//}
@see Array#length, Array#size... -
Integer
# bit _ length -> Integer (6358.0) -
self を表すのに必要なビット数を返します。
...(0 や
-1 である)場合は 0 を返します。
//emlist[例: ceil(log2(int < 0 ? -int : int+1)) と同じ結果][ruby]{
(-2**12-1).bit_length # => 13
(-2**12).bit_length # => 12
(-2**12+1).bit_length # => 12
-0x101.bit_length # => 9
-0x100.bit_length # => 8
-0xff.b......# => 8
-2.bit_length # => 1
-1.bit_length # => 0
0.bit_length # => 0
1.bit_length # => 1
0xff.bit_length # => 8
0x100.bit_length # => 9
(2**12-1).bit_length # => 12
(2**12).bit_length # => 13
(2**12+1).bit_length......# => 13
//}
@see Integer#size... -
Net
:: HTTPHeader # content _ length -> Integer|nil (6264.0) -
Content-Length: ヘッダフィールドの表している値を整数で返します。
...Content-Length: ヘッダフィールドの表している値を整数で返します。
ヘッダが設定されていない場合には nil を返します。
@raise Net::HTTPHeaderSyntaxError フィールドの値が不正である場合に
発生します。......//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.content_length # => nil
req.content_length = 10
req.content_length # => 10
//}... -
Net
:: HTTPHeader # range _ length -> Integer|nil (6254.0) -
Content-Range: ヘッダフィールドの表している長さを整数で返します。
...Content-Range: ヘッダフィールドの表している長さを整数で返します。
ヘッダが設定されていない場合には nil を返します。
@raise Net::HTTPHeaderSyntaxError Content-Range: ヘッダフィールド
の値が不正である......発生します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req['Content-Range'] = "bytes 1-500/1000"
req.range_length # => 500
//}... -
Net
:: HTTPHeader # content _ length=(len) (6176.0) -
Content-Length: ヘッダフィールドに値を設定します。
...Content-Length: ヘッダフィールドに値を設定します。
len に nil を与えると Content-Length: ヘッダフィールドを
削除します。
@param len 設定する値を整数で与えます。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/ind......ex.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.content_length # => nil
req.content_length = 10 # => 10
req.content_length # => 10
//}... -
String
# size -> Integer (3132.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... -
CSV
:: Table # size -> Integer (3126.0) -
(ヘッダを除く)行数を返します。
...(ヘッダを除く)行数を返します。
Array#length, Array#size に委譲しています。
//emlist[][ruby]{
require 'csv'
csv = CSV.new("a,b,c\n1,2,3", headers: true)
table = csv.read
p table.size # => 1
//}
@see Array#length, Array#size... -
Array
# [](start , length) -> Array | nil (290.0) -
start 番目から length 個の要素を含む部分配列を返します。 start が自身の範囲外となる時は nil を返します。ただし、start が配列の長さに等しいときは空の配列を返します。 length が負の時は nil を返します。
...start 番目から length 個の要素を含む部分配列を返します。
start が自身の範囲外となる時は nil を返します。ただし、start が配列の長さに等しいときは空の配列を返します。
length が負の時は nil を返します。
@param start 生成......要素が -1 番目になります。
整数以外のオブジェクトを指定した場合は to_int メソッドによ
る暗黙の型変換を試みます。
@param length 生成したい部分配列の長さを整数で指定します。
length が start......黙の型変換を試みます。
@raise TypeError 引数に整数以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。
//emlist[例][ruby]{
a = [ "a", "b", "c", "d", "e" ]
a[0, 1] #=> ["a"]
a[-1, 1] #=> ["e"]
a[0, 10] #=>...