Skip to main content

slugify

Convert to ASCII. Convert spaces to hyphens. Remove characters that aren't alphanumerics, underscores, or hyphens. Convert to lowercase. Also strip leading and trailing whitespace.

def slugify(
value: string
) - > string

Convert to ASCII. Convert spaces to hyphens. Remove characters that aren't alphanumerics, underscores, or hyphens. Convert to lowercase. Also strip leading and trailing whitespace.

Parameters

NameTypeDescription
valuestringThe input string to be converted into a URL-safe slug.

Returns

TypeDescription
stringThe processed string transformed into a URL-friendly slug format.