るりまサーチ

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

別のキーワード

  1. string scan
  2. _builtin scan
  3. c scan
  4. strscan scan
  5. rd scan

ライブラリ

クラス

検索結果

StringScanner#clear -> self (21114.0)

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

...st[例][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 (6014.0)

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

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