Skip to main content

slugify_pattern

Function slugify_pattern 

Source
pub fn slugify_pattern(pattern: &str) -> String
Expand description

Slugify a model pattern for use in a stable id.

Mirrors the template’s historical implementation in extensions/web/admin/.../gateway.rs: * becomes star, non-alphanumeric runs collapse to a single -, leading/trailing - are trimmed, and an empty result becomes route.