Skip to main content

slugify(text)

Signature: slugify(text: str) -> str

Converts text to a URL-friendly slug: lowercases, replaces whitespace with -, removes non-alphanumerics (keeping -) and collapses repeated -.

Example

function example() returns null {
print(slugify("Hello, World!")); # hello-world
}