るりまサーチ

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

別のキーワード

  1. _builtin to_r
  2. open3 pipeline_r
  3. matrix elements_to_r
  4. fileutils rm_r
  5. fileutils cp_r

ライブラリ

キーワード

検索結果

<< < ... 4 5 6 >>

StringScanner#eos? -> bool (6026.0)

スキャンポインタが文字列の末尾を指しているなら true を、 末尾以外を指しているなら false を返します。

...しているなら true を、
末尾以外を指しているなら false を返します。

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

StringScanner#matched? -> bool (6026.0)

前回のマッチが成功していたら true を、 失敗していたら false を返します。

...していたら true を、
失敗していたら false を返します。

//emlist[例][ruby]{
require
'strscan'

s = StringScanner.new('test string')
s.matched? # => false
s.scan(/\w+/) # => "test"
s.matched? # => true
s.scan(/\w+/) # => nil
s.matched? # => false
s.scan(/\s+/) # => " "
s...
....matched? # => true
//}...
<< < ... 4 5 6 >>