687件ヒット
[1-100件を表示]
(0.108秒)
別のキーワード
ライブラリ
クラス
-
ARGF
. class (12) - Array (69)
- CSV (12)
-
CSV
:: Table (24) -
Encoding
:: Converter (24) - Enumerator (12)
- File (24)
- Integer (24)
- Matrix (24)
-
Net
:: HTTPGenericRequest (24) - Object (48)
- Random (12)
- Range (25)
- String (223)
- StringScanner (48)
-
Thread
:: SizedQueue (58)
モジュール
-
Fiddle
:: Importer (12) -
Rake
:: TaskManager (12)
キーワード
- [] (72)
- bind (12)
- binmode (12)
-
bit
_ length (12) -
body
_ stream (12) -
body
_ stream= (12) - bsearch (48)
- byterindex (3)
- bytes (12)
- bytesize (12)
- clear (12)
- close (10)
- deq (12)
-
each
_ grapheme _ cluster (16) -
each
_ index (24) -
enum
_ for (24) -
field
_ size _ limit (12) - length (24)
- max= (12)
- minor (24)
- pack (21)
- peek (12)
- peep (12)
- pop (12)
-
primitive
_ convert (24) - rindex (12)
- shift (12)
- slice (72)
-
synthesize
_ file _ task (12) - terminate (12)
-
to
_ enum (24) - truncate (12)
- unpack (12)
検索結果
先頭5件
-
Range
# size -> Integer | Float :: INFINITY | nil (24244.0) -
範囲内の要素数を返します。
...il を返し、始端が succ メソッドを持たない場合は TypeError が発生します。
@raise TypeError self がイテレート可能でない場合に発生します。
//emlist[例][ruby]{
(10..20).size # => 11
("a".."z").size # => nil
(1..).size # => Infinity
(-Float::INFI......NITY..Float::INFINITY).size # => can't iterate from Float (TypeError)
//}... -
Enumerator
# size -> Integer | Float :: INFINITY | nil (24238.0) -
self の要素数を返します。
...:INFINITY を返します。
Enumerator.new に Proc オブジェクトを指定していた場合はその
実行結果を返します。呼び出した時に要素数が不明であった場合は nil を返し
ます。
//emlist[例][ruby]{
(1..100).to_a.permutation(4).size # => 94109400
loop.si......ze # => Float::INFINITY
(1..100).drop_while.size # => nil
//}
@see Enumerator.new... -
File
# size -> Integer (24238.0) -
ファイルのサイズを返します。
...ファイルのサイズを返します。
//emlist[例][ruby]{
File.open("/dev/null") do |f|
f.size #=> 0
end
//}
@raise IOError 自身が close されている場合に発生します。
@raise Errno::EXXX 失敗した場合に発生します。
@see File#lstat... -
Integer
# size -> Integer (24232.0) -
整数の実装上のサイズをバイト数で返します。
...整数の実装上のサイズをバイト数で返します。
//emlist[][ruby]{
p 1.size # => 8
p 0x1_0000_0000.size # => 8
//}
@see Integer#bit_length... -
String
# size -> Integer (21238.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 (18238.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... -
CSV
# field _ size _ limit -> Integer (12244.0) -
フィールドサイズの最大値を返します。
...。
//emlist[例][ruby]{
require "csv"
csv = CSV.new(DATA)
csv.field_size_limit # => nil
p csv.read # => [["a", "b"], ["\n2\n2\n", ""]]
DATA.rewind
csv = CSV.new(DATA, field_size_limit: 4)
p csv.field_size_limit # => 4
csv.read # => #<CSV::MalformedCSVError: Field size exceeded on line 2.>
__END......__
"a","b"
"
2
2
",""
//}
@see CSV.new... -
Rake
:: TaskManager # synthesize _ file _ task(task _ name) -> Rake :: FileTask | nil (12231.0) -
与えられたタスク名をもとにファイルタスクを合成します。
...合成します。
@param task_name タスク名を指定します。
@return 与えられたタスク名と同名のファイルが存在する場合は、ファイルタスクを作成して返します。
そうでない場合は nil を返します。
@raise RuntimeError タスクを......//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do |task|
task.application.synthesize_file_task("sample_file") # => nil
IO.write("sample_file", "")
task.application.synthesize_file_task("sample_file") # => <Rake::FileTask sample_file =>... -
String
# bytesize -> Integer (12231.0) -
文字列のバイト長を整数で返します。
...文字列のバイト長を整数で返します。
//emlist[例][ruby]{
#coding:UTF-8
# 実行結果は文字コードによって異なります。
p "いろは".size #=> 3
p "いろは".bytesize #=> 9
//}
@see String#size... -
String
# rindex(pattern , pos = self . size) -> Integer | nil (9356.0) -
文字列のインデックス pos から左に向かって pattern を探索します。 最初に見つかった部分文字列の左端のインデックスを返します。 見つからなければ nil を返します。
...します。
見つからなければ nil を返します。
引数 pattern は探索する部分文字列または正規表現で指定します。
pos が負の場合は、文字列の末尾から数えた位置から探索します。
rindex と String#index とでは、探索方向だけが......。
//emlist[String#index の場合][ruby]{
p "stringstring".index("ing", 1) # => 3
# ing # ここから探索を始める
# ing
# ing # 右にずらしていってここで見つかる
//}
//emlist[String#rindex の場合][ruby]{
p "stringstring".rindex("ing", -1)......# ing # インデックス -1 の文字から探索を始める
# ing
# ing # 左にずらしていってここで見つかる
//}
@param pattern 探索する部分文字列または正規表現
@param pos 探索を始めるインデックス
//emlis...