1148件ヒット
[1-100件を表示]
(0.082秒)
別のキーワード
ライブラリ
- ビルトイン (956)
-
cgi
/ core (12) - csv (24)
- forwardable (24)
-
net
/ http (132)
クラス
-
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)
- Forwardable (24)
-
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) - delegate (12)
- delete (12)
- fetch (36)
- fill (72)
-
get
_ fields (12) - header (12)
-
instance
_ delegate (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 (18132.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 (18126.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 (6204.0) -
self を表すのに必要なビット数を返します。
...果][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.bit_length # => 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=(len) (6154.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
//}... -
Net
:: HTTPHeader # content _ length -> Integer|nil (6148.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 (6120.0) -
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
//}... -
String
# size -> Integer (3032.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 (3026.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 , val) (220.0) -
インデックス start から length 個の要素を配列 val の内容で置き換えます。 start が自身の末尾を越える時には配列の長さを自動的に拡張し、拡張した領域を nil で初期化します。
...インデックス start から length 個の要素を配列 val の内容で置き換えます。
start が自身の末尾を越える時には配列の長さを自動的に拡張し、拡張した領域を nil で初期化します。
//emlist[例][ruby]{
ary = [0, 1, 2, 3]
ary[1, 2] = ["a", "b"......1] = "Z"
p ary #=> [0, 1, 2, nil, nil, "Z"]
ary = [0, 1, 2, 3]
ary[0, 10] = ["a"]
p ary #=> ["a"]
//}
@param start 置き換えたい範囲の先頭のインデックスを指定します。
start の値が負の時には末尾からの......を指定した場合は to_int メソッドによ
る暗黙の型変換を試みます。
@param length 置き換えたい要素の個数を指定します。
length の値が 0 のときは start の直前に val を挿入します。
整数以外のオブ...