Method: Chars::CharSet#substrings_with_indexes

Defined in:
lib/chars/char_set.rb

#substrings_with_indexes(data, **kwargs) ⇒ Array<(String, Integer)>

Returns an Array of all substrings and their indices within the given string, of minimum length and that are made up of characters from the Chars::CharSet.

Parameters:

Options Hash (**kwargs):

  • :min_length (Integer)

    The minimum length of sub-strings found within the given data.

Returns:

  • (Array<(String, Integer)>)

    Tthe array of substrings and their indices within the given data.

See Also:

Since:

  • 0.3.0



483
484
485
# File 'lib/chars/char_set.rb', line 483

def substrings_with_indexes(data,**kwargs)
  each_substring_with_index(data,**kwargs).to_a
end