るりまサーチ

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

別のキーワード

  1. _builtin clear
  2. rake clear
  3. set clear
  4. dbm clear
  5. gdbm clear

クラス

検索結果

StringScanner#clear -> self (18109.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 -> self (3009.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 は将来のバージョ...