るりまサーチ (Ruby 2.2.0)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.117秒)
トップページ > バージョン:2.2.0[x] > 種類:インスタンスメソッド[x] > クエリ:g[x] > クエリ:clear[x] > クラス:StringScanner[x]

別のキーワード

  1. openssl g
  2. openssl g=
  3. dh g
  4. dsa g
  5. dsa g=

ライブラリ

検索結果

StringScanner#clear -> self (63328.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 を使ってください。...

StringScanner#terminate -> self (18028.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 を使ってください。...