What's the fastest way to convert a string of text into a url-safe variable?
- by ensnare
I'd like to convert a string of text, e.g., "User Name" into something which I can turn into part of a url, e.g., "User-Name." What's the fastest way to do a string replacement ("-" for " ") as well as make sure that characters are only [a-zA-Z0-9]?