427件ヒット
[1-100件を表示]
(0.035秒)
ライブラリ
- ビルトイン (130)
- matrix (11)
-
net
/ http (22) -
rubygems
/ source _ index (33) -
win32
/ registry (176)
クラス
- Array (73)
-
Gem
:: SourceIndex (33) -
Net
:: HTTPGenericRequest (22) -
RubyVM
:: InstructionSequence (11) - String (13)
- Vector (11)
モジュール
-
GC
:: Profiler (22) -
Win32
:: Registry :: API (176)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - CloseKey (11)
- CreateKey (11)
- DeleteKey (11)
- DeleteValue (11)
- EnumKey (11)
- EnumValue (11)
- FlushKey (11)
-
NEWS for Ruby 2
. 0 . 0 (11) - OpenKey (11)
- QueryInfoKey (11)
- QueryValue (11)
- SetValue (11)
- String (11)
- basis (11)
-
body
_ stream (11) -
body
_ stream= (11) - bsearch (18)
- byterindex (2)
-
cgi
/ session (11) - check (11)
-
each
_ index (22) - length (11)
-
net
/ pop (11) - new (33)
- packdw (11)
- packqw (11)
- report (11)
- result (11)
- rindex (11)
-
ruby 1
. 6 feature (11) -
to
_ a (11) - unpackdw (11)
- unpackqw (11)
検索結果
先頭5件
-
Gem
:: SourceIndex # size -> Integer (21101.0) -
- 2.1.0
- 2.1.0
- 2.2.0
- 2.2.0
- 2.3.0
- 2.3.0
- 2.4.0
- 2.4.0
- 2.5.0
- 2.5.0
- 2.6.0
- 2.6.0
- 2.7.0
- 2.7.0
- 3.0
- 3.0
- 3.1
- 3.1
- 3.2
- 3.2
- 3.3
- 3.3
自身のサイズを返します。
自身のサイズを返します。自身に含まれる Gem の個数を返します。 -
String
# rindex(pattern , pos = self . size) -> Integer | nil (6225.0) -
文字列のインデックス pos から左に向かって pattern を探索します。 最初に見つかった部分文字列の左端のインデックスを返します。 見つからなければ nil を返します。
...列または正規表現で指定します。
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) # =......ンデックス
//emlist[例][ruby]{
p "astrochemistry".rindex("str") # => 10
p "character".rindex(?c) # => 5
p "regexprindex".rindex(/e.*x/, 2) # => 1
p "foobarfoobar".rindex("bar", 6) # => 3
p "foobarfoobar".rindex("bar", -6) # => 3
//}
@see String#index... -
Array
# each _ index {|index| . . . . } -> self (6221.0) -
各要素のインデックスに対してブロックを評価します。
...ブロックを評価します。
以下と同じです。
//emlist[例][ruby]{
(0 ... ary.size).each do |index|
# ....
end
//}
ブロックが与えられなかった場合は、自身と each_index から生成した
Enumerator オブジェクトを返します。
@see Array#each, Array#reve... -
String
# byterindex(pattern , offset = self . bytesize) -> Integer | nil (6200.0) -
文字列のバイト単位のインデックス offset から左に向かって pattern を探索します。 最初に見つかった部分文字列の左端のバイト単位のインデックスを返します。 見つからなければ nil を返します。
...は正規表現で指定します。
offset が負の場合は、文字列の末尾から数えた位置から探索します。
byterindex と String#byteindex とでは、探索方向だけが逆になります。
完全に左右が反転した動作をするわけではありません。
探索......String#byteindex の場合][ruby]{
p "stringstring".byteindex("ing", 1) # => 3
# ing # ここから探索を始める
# ing
# ing # 右にずらしていってここで見つかる
//}
//emlist[String#byterindex の場合][ruby]{
p "stringstring".byterindex("ing", -1......'foo'.byterindex('f') # => 0
'foo'.byterindex('o') # => 2
'foo'.byterindex('oo') # => 1
'foo'.byterindex('ooo') # => nil
'foo'.byterindex(/f/) # => 0
'foo'.byterindex(/o/) # => 2
'foo'.byterindex(/oo/) # => 1
'foo'.byterindex(/ooo/) # => nil
# 右でのマッチが優先
'foo'.byterindex(/o+/) # =... -
Array
# each _ index -> Enumerator (6121.0) -
各要素のインデックスに対してブロックを評価します。
...ブロックを評価します。
以下と同じです。
//emlist[例][ruby]{
(0 ... ary.size).each do |index|
# ....
end
//}
ブロックが与えられなかった場合は、自身と each_index から生成した
Enumerator オブジェクトを返します。
@see Array#each, Array#reve... -
Gem
:: SourceIndex # length -> Integer (3001.0) -
自身に含まれる Gem の個数を返します。
自身に含まれる Gem の個数を返します。 -
Vector
. basis(size: , index:) -> Vector (258.0) -
size 次元ベクトル空間の index 番目の標準基底を返します。
...
size 次元ベクトル空間の index 番目の標準基底を返します。
//emlist[例][ruby]{
require 'matrix'
Vector.basis(size: 3, index: 1) # => Vector[0, 1, 0]
//}
@param size ベクトルの次元
@param index 標準基底の何番目か。0 origin... -
Array
. new(size) {|index| . . . } -> Array (239.0) -
長さ size の配列を生成し、各要素のインデックスを引数としてブロックを実行し、 各要素の値をブロックの評価結果に設定します。
...長さ size の配列を生成し、各要素のインデックスを引数としてブロックを実行し、
各要素の値をブロックの評価結果に設定します。
ブロックは要素毎に実行されるので、全要素をあるオブジェクトの複製にすることがで......きます。
@param size 配列の長さを数値で指定します。
//emlist[例][ruby]{
ary = Array.new(3){|index| "hoge#{index}"}
p ary #=> ["hoge0", "hoge1", "hoge2"]
//}
//emlist[例][ruby]{
ary = Array.new(3){ "foo" }
p ary #=> ["foo", "foo", "foo... -
Array
. new(size = 0 , val = nil) -> Array (129.0) -
長さ size の配列を生成し、各要素を val で初期化して返します。
...長さ size の配列を生成し、各要素を val で初期化して返します。
要素毎に val が複製されるわけではないことに注意してください。
全要素が同じオブジェクト val を参照します。
後述の例では、配列の各要素は全て同一の......文字列を指します。
@param size 配列の長さを数値で指定します。
@param val 配列の要素の値を指定します。
//emlist[例][ruby]{
ary = Array.new(3, "foo")
p ary #=> ["foo", "foo", "foo"]
ary[0].capitalize!
p ary #=> ["Foo", "...