Skip to main content

slugify

Function slugify 

Source
pub fn slugify(input: &str) -> String
Expand description

Create a URL-safe slug from arbitrary input.

Wraps the slug crate, which transliterates Unicode (so "Café" becomes "cafe", Cyrillic and CJK get sensible romanisations) and emits the standard kebab-case shape used across most slug-generating tooling. Returns "untitled" when the slug would otherwise be empty (the slug crate itself returns an empty string for input that has no transliterable characters).