るりまサーチ

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

別のキーワード

  1. _builtin to_r
  2. open3 pipeline_r
  3. matrix elements_to_r
  4. bigdecimal to_r
  5. fileutils cp_r

ライブラリ

クラス

検索結果

StringScanner#matched? -> bool (21225.0)

前回のマッチが成功していたら true を、 失敗していたら false を返します。

...true を、
失敗していたら false を返します。

//emlist[例][ruby]{
r
equire 'strscan'

s = StringScanner.new('test string')
s.matched? # => false
s.scan(/\w+/) # => "test"
s.matched? # => true
s.scan(/\w+/) # => nil
s.matched? # => false
s.scan(/\s+/) # => " "
s.matched? #...
...=> true
//}...