Project: Substrings
Learn how to build a simple command-line application that returns a hash listing of substrings.
Assignment
Implement a method #substrings
that takes a word as the first argument and then an array of valid substrings (your dictionary) as the second argument. It should return a hash listing each substring (case insensitive) that was found in the original string and how many times it was found.
Next, make sure your method can handle multiple words:
Please note the order of your keys might be different.
Quick tips
Recall how to turn strings into arrays and arrays into strings.
Last updated