るりまサーチ

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

別のキーワード

  1. _builtin min
  2. enumerable min
  3. _builtin min_by
  4. enumerable min_by
  5. range min

クラス

検索結果

StringScanner#terminate -> self (3102.0)

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

...self.string.size と同じ動作です。

//emlist[例][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 を使ってください。...