URL part codec

I implement a codec to convert strings to URL parts by replacing
sensitive characters such as non-word characters by dashes and
converting the whole string to lower case.