Method: Chars::CharSet#substrings

Defined in:
lib/chars/char_set.rb

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

Returns an Array of all substrings 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>)

    Tthe array of substrings within the given data.

See Also:

Since:

  • 0.3.0



535
536
537
# File 'lib/chars/char_set.rb', line 535

def substrings(data,**kwargs)
  each_substring(data,**kwargs).to_a
end