るりまサーチ (Ruby 2.2.0)

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

別のキーワード

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

ライブラリ

クラス

検索結果

StringScanner#clear -> self (54364.0)

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

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

@return self を返します。

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]...

StringScanner#terminate -> self (54364.0)

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

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

@return self を返します。

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]...