My task involves taking a string and modifying it so that it can be appended to a query.
For instance, I may start with the string "A Basket For Every Occasion" and need it to become "A-Basket-For-Every-Occasion".
The process requires locating spaces within the string and replacing them with hyphens. If there are multiple spaces, the process needs to be repeated until all spaces have been replaced.
This seems like a job for a recursive function, but I'm unsure how to implement one. Any assistance on this matter would be highly appreciated.