るりまサーチ (Ruby 2.6.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.130秒)
トップページ > バージョン:2.6.0[x] > クエリ:E[x] > クエリ:min[x] > クラス:StringScanner[x]

別のキーワード

  1. open3 popen2e
  2. socket af_e164
  3. matrix rank_e
  4. matrix det_e
  5. open3 capture2e

ライブラリ

検索結果

StringScanner#terminate -> self (27604.0)

スキャンポインタを文字列末尾後まで進め、マッチ記録を捨てます。

...[例][ruby]{
require 'strscan'

s = StringScanner.new('test string')
s.scan(/\w+/) # => "test"
s.matched # => "test"
s.pos # => 4
s[0] # => "test"
s.terminate
s.matched # => nil
s[0] # => nil
s.pos # => 11
//}

StringScanner
#clear は将来のバージョン...
...で削除される予定です。
代わりに StringScanner#terminate を使ってください。...