mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Document that StringScanner#matched_size returns size in bytes [ci skip]
Fixes [Bug #17139]
This commit is contained in:
parent
0938bad0a5
commit
d9b8411a7b
1 changed files with 3 additions and 2 deletions
|
@ -1089,8 +1089,9 @@ strscan_matched(VALUE self)
|
|||
}
|
||||
|
||||
/*
|
||||
* Returns the size of the most recent match (see #matched), or +nil+ if there
|
||||
* was no recent match.
|
||||
* Returns the size of the most recent match in bytes, or +nil+ if there
|
||||
* was no recent match. This is different than <tt>matched.size</tt>,
|
||||
* which will return the size in characters.
|
||||
*
|
||||
* s = StringScanner.new('test string')
|
||||
* s.check /\w+/ # -> "test"
|
||||
|
|
Loading…
Add table
Reference in a new issue