377件ヒット
[1-100件を表示]
(0.041秒)
種類
- インスタンスメソッド (297)
- 文書 (62)
- クラス (12)
- 特異メソッド (6)
ライブラリ
- ビルトイン (315)
クラス
- Enumerator (6)
-
Enumerator
:: Lazy (69) - Symbol (120)
モジュール
- Enumerable (108)
キーワード
- Lazy (12)
-
NEWS for Ruby 2
. 2 . 0 (11) -
NEWS for Ruby 2
. 3 . 0 (10) -
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 3
. 0 . 0 (5) -
NEWS for Ruby 3
. 1 . 0 (4) - [] (60)
-
chunk
_ while (12) -
each
_ cons (12) -
each
_ entry (12) -
each
_ slice (12) - produce (6)
-
ruby 1
. 6 feature (12) -
ruby 1
. 9 feature (12) -
slice
_ after (46) -
slice
_ before (60) -
slice
_ when (23)
検索結果
先頭5件
-
Symbol
# slice(substr) -> String | nil (15128.0) -
self が substr を含む場合、一致した文字列を新しく作って返します。
...self が substr を含む場合、一致した文字列を新しく作って返します。
(self.to_s[substr] と同じです。)
例:
:foobar.slice("foo") # => "foo"
:foobar.slice("baz") # => nil... -
Symbol
# slice(range) -> String | nil (15123.0) -
rangeで指定したインデックスの範囲に含まれる部分文字列を返します。
...rangeで指定したインデックスの範囲に含まれる部分文字列を返します。
(self.to_s[range] と同じです。)
@param range 取得したい文字列の範囲を示す Range オブジェクトを指定します。
:foo[0..1] # => "fo"
@see String#[] , String#slice... -
Symbol
# slice(nth) -> String | nil (15118.0) -
nth 番目の文字を返します。
...nth 番目の文字を返します。
(self.to_s[nth] と同じです。)
@param nth 文字の位置を表す整数を指定します。
:foo[0] # => "f"
:foo[1] # => "o"
:foo[2] # => "o"... -
Symbol
# slice(nth , len) -> String | nil (15118.0) -
nth 番目から長さ len の部分文字列を新しく作って返します。
...nth 番目から長さ len の部分文字列を新しく作って返します。
(self.to_s[nth, len] と同じです。)
@param nth 文字の位置を表す整数を指定します。
@param len 文字列の長さを指定します。
:foo[1, 2] # => "oo"... -
Symbol
# slice(regexp , nth = 0) -> String | nil (15118.0) -
正規表現 regexp の nth 番目の括弧にマッチする最初の部分文字列を返します。
...正規表現 regexp の nth 番目の括弧にマッチする最初の部分文字列を返します。
(self.to_s[regexp, nth] と同じです。)
@param regexp 正規表現を指定します。
@param nth 取得したい正規表現レジスタのインデックスを指定します。
:foo... -
Enumerator
:: Lazy # slice _ before {|elt| bool } -> Enumerator :: Lazy (9237.0) -
Enumerable#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。
...Enumerable#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。
//emlist[例][ruby]{
1.step.lazy.slice_before { |e| e.even? }
# => #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x00007f9f31844ce8>:each>>
1.step.lazy.slice_before { |e| e % 3 == 0 }.t......ake(5).force
# => [[1, 2], [3, 4, 5], [6, 7, 8], [9, 10, 11], [12, 13, 14]]
//}
@see Enumerable#slice_before... -
Enumerator
:: Lazy # slice _ before(initial _ state) {|elt , state| bool } -> Enumerator :: Lazy (9237.0) -
Enumerable#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。
...Enumerable#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。
//emlist[例][ruby]{
1.step.lazy.slice_before { |e| e.even? }
# => #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x00007f9f31844ce8>:each>>
1.step.lazy.slice_before { |e| e % 3 == 0 }.t......ake(5).force
# => [[1, 2], [3, 4, 5], [6, 7, 8], [9, 10, 11], [12, 13, 14]]
//}
@see Enumerable#slice_before... -
Enumerator
:: Lazy # slice _ before(pattern) -> Enumerator :: Lazy (9237.0) -
Enumerable#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。
...Enumerable#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。
//emlist[例][ruby]{
1.step.lazy.slice_before { |e| e.even? }
# => #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x00007f9f31844ce8>:each>>
1.step.lazy.slice_before { |e| e % 3 == 0 }.t......ake(5).force
# => [[1, 2], [3, 4, 5], [6, 7, 8], [9, 10, 11], [12, 13, 14]]
//}
@see Enumerable#slice_before... -
Enumerator
:: Lazy # slice _ after {|elt| bool } -> Enumerator :: Lazy (9236.0) -
Enumerable#slice_after と同じですが、配列ではなく Enumerator::Lazy を返します。
...Enumerable#slice_after と同じですが、配列ではなく Enumerator::Lazy を返します。
//emlist[例][ruby]{
1.step.lazy.slice_after { |e| e % 3 == 0 }
# => #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x007fd73980e6f8>:each>>
1.step.lazy.slice_after { |e| e % 3 == 0 }.tak......e(5).force
# => [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12], [13, 14, 15]]
//}
@see Enumerable#slice_after...