Converts a string to a slug.