るりまサーチ (Ruby 2.3.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.071秒)

別のキーワード

  1. fiddle sym
  2. handle sym
  3. _builtin to_sym
  4. symbol to_sym
  5. string to_sym

ライブラリ

クラス

検索結果

Symbol#match(other) -> Integer | nil (63397.0)

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

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

(self.to_s.match(other) と同じです。)

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

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

p :foo.match(/foo/) # => 0
p :foobar.match(/bar/) # => 3
p :foo.match(/bar/) # => nil

@see String#match