mercredi 18 février 2015

algorithm for converting title to url fragment


What's a good algorithm for converting a title to a url? I'm looking for the equivalent of what stackoverflow uses to convert post titles such as:



How do JavaScript closures work?



to urls:


http://ift.tt/15F3ppi


Needs to strip punctuation etc, etc.


There must be some tried and true publicly available algorithm but I'm not finding anything.





Aucun commentaire:

Enregistrer un commentaire