matched_size

matched_size()
Instance Public methods

Returns the size of the most recent match (see matched), or nil if there was no recent match.

1
2
3
4
5
s = StringScanner.new('test string')
s.check /\w+/           # -> "test"
s.matched_size          # -> 4
s.check /\d+/           # -> nil
s.matched_size          # -> nil
doc_ruby_on_rails
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.