るりまサーチ

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

別のキーワード

  1. symbol []
  2. symbol slice
  3. win32ole cp_symbol
  4. tracer event_symbol
  5. _builtin symbol

ライブラリ

検索結果

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

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

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

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

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

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

@see String#=~...