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.
507 508 509 510 511 512 513 |
# File 'lib/chars/char_set.rb', line 507 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 |