るりまサーチ

最速Rubyリファレンスマニュアル検索!
3件ヒット [1-3件を表示] (0.195秒)
トップページ > クエリ:-[x] > クエリ:E[x] > クエリ:Ruby[x] > クエリ:intersect?[x]

別のキーワード

  1. open3 popen2e
  2. socket af_e164
  3. open3 capture2e
  4. matrix det_e
  5. matrix rank_e

ライブラリ

クラス

検索結果

Array#intersect?(other) -> bool (24406.0)

other と共通の要素が少なくとも1個あれば true を、なければ false を返します。

...other と共通の要素が少なくとも1個あれば true を、なければ false を返します。

//emlist[例][ruby]{
a = [ 1, 2, 3 ]
b = [ 3, 4, 5 ]
c = [ 5, 6, 7 ]
a.intersect?(b) # => true
a.intersect?(c) # => false
//}...