るりまサーチ

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

別のキーワード

  1. _builtin to_c
  2. etc sc_2_c_dev
  3. etc sc_2_c_bind
  4. tracer display_c_call
  5. tracer display_c_call?

ライブラリ

検索結果

StringScanner#terminate -> self (18114.0)

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

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

StringScanner#clear -> self (6114.0)

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

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