2件ヒット
[1-2件を表示]
(0.133秒)
ライブラリ
- strscan (2)
キーワード
- eos? (1)
-
post
_ match (1)
検索結果
-
StringScanner
# post _ match -> String | nil (18607.0) -
前回マッチを行った文字列のうち、マッチしたところよりも後ろの 部分文字列を返します。前回のマッチが失敗していると常に nil を 返します。
...字列を返します。前回のマッチが失敗していると常に nil を
返します。
//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new('test string')
s.post_match # => nil
s.scan(/\w+/) # => "test"
s.post_match # => " string"
s.scan(/\w+/) # => nil
s.post_match # => nil
s... -
StringScanner
# eos? -> bool (9607.0) -
スキャンポインタが文字列の末尾を指しているなら true を、 末尾以外を指しているなら false を返します。
...][ruby]{
require 'strscan'
s = StringScanner.new('test string')
s.eos? # => false
s.scan(/\w+/)
s.scan(/\s+/)
s.scan(/\w+/)
s.eos? # => true
//}
StringScanner#empty? は将来のバージョンで削除される予定です。
代わりに StringScanner#eos? を使ってください...