るりまサーチ (Ruby 2.1.0)

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

別のキーワード

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

ライブラリ

クラス

検索結果

StringScanner#terminate -> self (54361.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#clear -> self (9061.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]...