Skip to main content

file_token

Function file_token 

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

Turns a stream name or subject into a safe file name part.

ASCII letters, digits, -, _ and . are kept, anything else becomes _. A leading . (or an empty result) gets a _ prefix so no hidden or special name is produced.