るりまサーチ

最速Rubyリファレンスマニュアル検索!
24件ヒット [1-24件を表示] (0.073秒)

別のキーワード

  1. _builtin pos
  2. _builtin pos=
  3. csv pos
  4. csv pos=
  5. zlib pos

ライブラリ

クラス

検索結果

StringScanner#clear -> self (18126.0)

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

...

pos
= 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 を使ってください。...

StringScanner#terminate -> self (3026.0)

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

...

pos
= 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 を使ってください。...