Method: Chars::CharSet#each_substring
- Defined in:
- lib/chars/char_set.rb
#each_substring(data, **kwargs) ⇒ Enumerator
Enumerates over all substrings within the given string, of minimum length and that are made up of characters from the Chars::CharSet.
521 522 523 524 525 526 527 |
# File 'lib/chars/char_set.rb', line 521 def each_substring(data,**kwargs) return enum_for(__method__,data,**kwargs) unless block_given? each_substring_with_index(data,**kwargs) do |substring,index| yield substring end end |