るりまサーチ (Ruby 2.3.0)

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

別のキーワード

  1. string []=
  2. string slice
  3. string slice!
  4. string []
  5. string gsub!

ライブラリ

クラス

検索結果

StringScanner#terminate -> self (54379.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 (9079.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]...