Skip to main content

sanitize_path_component

Function sanitize_path_component 

Source
pub fn sanitize_path_component(component: &str) -> String
Expand description

Sanitizes a metadata value before using it as one path component.

assert_eq!(mtag_cli::planner::sanitize_path_component("AC/DC: Live?"), "AC_DC_ Live_");
assert_eq!(mtag_cli::planner::sanitize_path_component(".."), "_");