gix_validate::reference

Function name_partial_or_sanitize

Source
pub fn name_partial_or_sanitize(path: &BStr) -> BString
Expand description

The infallible version of name_partial() which instead of failing, alters path and returns it to be a valid partial name, which would also pass name_partial().

Note that an empty path is replaced with a - in order to be valid.