Skip to content

Latest commit

 

History

History
50 lines (28 loc) · 1.93 KB

README.md

File metadata and controls

50 lines (28 loc) · 1.93 KB



This project is part of The Odin Project's Ruby course. In this assignment, I implemented a method to count occurrences of specified substrings within a given word or phrase. This project helped deepen my understanding of string manipulation, arrays, and hashes in Ruby.

Screenshots

📝 Project Objective

The goal was to create a method called substrings that takes a word and an array of valid substrings (dictionary) as arguments. The method returns a hash listing each substring found in the original string and the number of times it was found. This project enhanced my skills in string manipulation and algorithm development.

🔧 Features

  • Accepts a string input and an array of valid substrings.

  • Handles case insensitivity, ensuring accurate substring matching.

  • Removes special characters from the input string to focus on words.

  • Returns a hash containing each substring found and its corresponding count.

📖 Learnings

  • String Manipulation: Improved my ability to process and clean strings by removing special characters.

  • Array and Hash Operations: Enhanced my understanding of iterating through arrays and managing hash structures to store results.

  • Case Handling: Gained experience in handling case insensitivity for accurate matching.

  • Algorithm Development: Practiced developing an algorithm for counting occurrences in a flexible way, allowing for multiple words.

💻 Technologies Used

  • Ruby for implementing the functionality of the substrings method.

💡 Acknowledgments

  • The Odin Project: For providing the project outline and guidance.