Take a string such as:
In C#: How do I add "Quotes" around string in a comma delimited list of strings?
and convert it to:
in-c-how-do-i-add-quotes-around-string-in-a-comma-delimited-list-of-strings
Requirements:
- Separate each word by a dash and remove all punctuation (taking into account not all words are separated by spaces.)
- Function takes in a max length, and gets all tokens below that max length. Example:
ToSeoFriendly("hello world hello world", 14)
returns"hello-world"
- All words are converted to lower case.
On a separate note, should there be a minimum length?