Ad
  • Default User Avatar

    takes an string , filters all of the characters except those in {a...z} and {A...Z}, translates each "word" (group of consecutive connected alphabetical characters into hodorSpeak based on the position of the character within the word 1 -> h, 2 -> o, etc. If a word is larger than length 5, it wraps around to the beginning. Keeps capitalization but obviously since we only have {h,o,d,r} as the alphabet for the translated word, there will be some collisions with different inputs. Joins together all the translated words with one space and returns the result as a string.