るりまサーチ

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

別のキーワード

  1. matrix l
  2. kernel $-l
  3. _builtin $-l
  4. lupdecomposition l
  5. l matrix

ライブラリ

クラス

検索結果

StringScanner#matched? -> bool (18225.0)

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

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

//emlist[例][ruby]{
require '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
//}...