るりまサーチ

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

別のキーワード

  1. string scan
  2. _builtin scan
  3. strscan scan_full
  4. stringscanner scan_full
  5. strscan scan_until

ライブラリ

クラス

検索結果

StringScanner#scan_full(regexp, s, f) -> object (21168.0)

スキャンポインタの位置から regexp と文字列のマッチを試します。

...ります。

* scan_full(regexp, true, true) は StringScanner#scan と同等。
* scan_full(regexp, true, false) は StringScanner#skip と同等。
* scan_full(regexp, false, true) は StringScanner#check と同等。
* scan_full(regexp, false, false) は StringScanner#match? と...
...= StringScanner.new('test string')
p s.scan_full(/\w+/, true, true) #=> "test"
p s.scan_full(/\s+/, false, true) #=> " "
p s.scan_full(/\s+/, true, false) #=> 1
p s.scan_full(/\w+/, false, false) #=> 6
p s.scan_full(/\w+/, true, true) #=> "string"
//}

@see StringScanner#scan StringS...
...canner#skip StringScanner#check StringScanner#match?...