This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def string_to_words_array(string) | |
dictionary = [] | |
temp_word = "" | |
string = string.downcase.split.join ' ' | |
string.each_char do |char| | |
if char.ord.between? 97, 122 or char.ord == 45 | |
temp_word << char |