るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.085秒)
トップページ > クエリ:-[x] > クエリ:y[x] > クラス:Symbol[x] > クエリ:=~[x]

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

ライブラリ

検索結果

Symbol#=~(other) -> Integer | nil (21225.0)

正規表現 other とのマッチを行います。

....to_s =~ other と同じです。)

@param other 比較対象のシンボルを指定します。

@return マッチが成功すればマッチした位置のインデックスを、そうでなければ nil を返します。

p :foo =~ /foo/ # => 0
p :foobar =~ /bar/ # => 3
p :foo =~ /bar...
.../ # => nil

@see String#=~...