Skip to main content

join_path

Function join_path 

Source
pub fn join_path(root: &str, leaf: &str) -> String
Expand description

Joins two slash-separated path fragments without emitting duplicate separators.

The helper is designed for runtime paths stored in configuration or database records. It keeps a leading slash from root, trims trailing slashes from root, and trims leading/trailing slashes from leaf.