Generates a slug from a string input.