Skip to main content

sanitize_name

Function sanitize_name 

Source
pub fn sanitize_name(raw: &str) -> String
Expand description

Sanitize an arbitrary string to a session-name-safe form: lowercase ASCII alphanumeric + - + _, replace other chars with -, dedupe consecutive dashes, trim leading/trailing dashes, max 32 chars.