{"id":16902127,"url":"https://github.com/abongsjoel/sub-strings","last_synced_at":"2025-04-11T14:23:44.892Z","repository":{"id":113544161,"uuid":"332825138","full_name":"abongsjoel/sub-strings","owner":"abongsjoel","description":"This project implements a  #substrings method that takes a word and an array of valid substrings as arguments and returns a hash listing each substring that was found.","archived":false,"fork":false,"pushed_at":"2021-01-26T13:51:57.000Z","size":6,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-25T10:37:42.328Z","etag":null,"topics":["ruby"],"latest_commit_sha":null,"homepage":"https://repl.it/@abongsjoel/substrings#main.rb","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abongsjoel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-25T17:20:33.000Z","updated_at":"2021-02-18T14:44:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"f62fa7fe-1a30-46a4-9aa0-dc2cfa47c2f9","html_url":"https://github.com/abongsjoel/sub-strings","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abongsjoel%2Fsub-strings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abongsjoel%2Fsub-strings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abongsjoel%2Fsub-strings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abongsjoel%2Fsub-strings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abongsjoel","download_url":"https://codeload.github.com/abongsjoel/sub-strings/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248418415,"owners_count":21100191,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ruby"],"created_at":"2024-10-13T18:03:57.545Z","updated_at":"2025-04-11T14:23:44.882Z","avatar_url":"https://github.com/abongsjoel.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sub Strings\n\n\u003e In this project, I implemented a simple #substrings method\n\nThe #substrings method takes a word as the first argument and then an array of valid substrings (our dictionary) as the second argument. It then returns a hash listing each substring (case insensitive) that was found in the original string and how many times it was found.\n\nE.g.\n\n```\n  \u003e dictionary = [\"below\",\"down\",\"go\",\"going\",\"horn\",\"how\",\"howdy\",\"it\",\"i\",\"low\",\"own\",\"part\",\"partner\",\"sit\"]\n  =\u003e [\"below\",\"down\",\"go\",\"going\",\"horn\",\"how\",\"howdy\",\"it\",\"i\",\"low\",\"own\",\"part\",\"partner\",\"sit\"]\n  \u003e substrings(\"below\", dictionary)\n  =\u003e { \"below\" =\u003e 1, \"low\" =\u003e 1 }\n```\n\nThe method can also handle multiple words. \n\nE.g.\n\n```\n  \u003e substrings(\"Howdy partner, sit down! How's it going?\", dictionary)\n  =\u003e { \"down\" =\u003e 1, \"go\" =\u003e 1, \"going\" =\u003e 1, \"how\" =\u003e 2, \"howdy\" =\u003e 1, \"it\" =\u003e 2, \"i\" =\u003e 3, \"own\" =\u003e 1, \"part\" =\u003e 1, \"partner\" =\u003e 1, \"sit\" =\u003e 1 }\n```\n\n## Built With\n\n- Ruby\n\n## Live Demo\n\n[Repl.it Link](https://repl.it/@abongsjoel/substrings#main.rb)\n\n\n## Author\n\n👤 **Chi A. Joel**\n\n- GitHub: [@abongsjoel](https://github.com/abongsjoel)\n- Twitter: [@thierryjoel10](https://twitter.com/ThierryJoel10)\n- LinkedIn: [Chi Abongwa Joel](https://www.linkedin.com/in/chi-abongwa-joel-b4285a97/)\n\n\n## Acknowledgments\n\n- [The Odin Project](https://www.theodinproject.com)\n\n\n## Contributing\n\nContributions, issues, and feature requests are welcome!\n\nFeel free to check the [issues page](https://github.com/abongsjoel/sub-strings/issues).\n\n\n## Show your support\nGive a ⭐️ if you like this project!\n\n## License\n  \u003cp\u003eThis project is \u003ca href=\"../main/LICENSE\"\u003eMIT\u003c/a\u003e licensed.\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabongsjoel%2Fsub-strings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabongsjoel%2Fsub-strings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabongsjoel%2Fsub-strings/lists"}