Skip to main content

replace_relative_prefix

Function replace_relative_prefix 

Source
pub fn replace_relative_prefix(
    path: &str,
    source_prefix: &str,
    destination_prefix: &str,
) -> String
Expand description

Re-roots a canonical descendant path from one mutation tree to another.

Only a complete path-segment prefix is stripped. An unmatched path is attached to the destination root unchanged so callers can preserve the original hierarchy in failure paths.