Function app_dirs::sanitized [] [src]

pub fn sanitized(component: &str) -> String

Returns a cross-platform-filename-safe version of any string.

This is used internally to generate app data directories based on app name/author. App developers can use it for consistency when dealing with file system operations.

Do not apply this function to full paths, as it will sanitize '/' and '\'; it should only be used on directory or file names (i.e. path segments).