method
matched_size
![Some documentation Importance_1](https://d2vfyqvduarcvs.cloudfront.net/images/importance_1.png?1349367920)
Ruby latest stable (v2_5_5)
-
0 notes -
Class: StringScanner
matched_size()
public
Returns the size of the most recent match (see #matched), or nil if there was no recent match.
s = StringScanner.new('test string') s.check /\w+/ # -> "test" s.matched_size # -> 4 s.check /\d+/ # -> nil s.matched_size # -> nil