Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/ole/support.rb
Overview
:nodoc:
Direct Known Subclasses
Ole::Types::Clsid, Ole::Types::Data, Ole::Types::Lpstr, Ole::Types::Lpwstr
Instance Method Summary collapse
-
#indexes(string) ⇒ Object
plural of String#index.
Instance Method Details
#indexes(string) ⇒ Object
plural of String#index. returns all offsets of string
. rename to indices?
note that it doesn’t check for overlapping values.
15 16 17 18 |
# File 'lib/ole/support.rb', line 15 def indexes string # in some ways i'm surprised that $~ works properly in this case... to_enum(:scan, /#{Regexp.quote string}/m).map { $~.begin 0 } end |