Tries to match with pattern at the current position. If there’s
a match, the scanner advances the “scan pointer” and returns the matched string. Otherwise, the scanner
s = StringScanner.new('test string')
p s.scan(/\w+/) # -> "test"
p s.scan(/\w+/) # -> nil
p s.scan(/\s+/) # -> " "
p s.scan(/\w+/) # -> "string"
p s.scan(/./) # -> nil
strscan_scan(VALUE self, VALUE re)
return strscan_do_scan(self, re, 1, 1, 1);
APIdock release: IRON STEVE (1.4)
If you have any comments, ideas or feedback, feel free to contact us at
APIdock copyright Nodeta Oy 2008-2014
Flowdock is a collaboration tool for technical teams. Version control, project management, deployments and your group chat in one place.