Skip to main content

normalize_origin_url

Function normalize_origin_url 

Source
pub fn normalize_origin_url(url: &str) -> String
Expand description

Normalize an origin URL to a canonical origin identifier.

Canonical origin identifiers are lowercase, stripped of protocol prefixes (hence: they are not URLs anymore), and “.git” trailers. They can be used to compare origin URLs for (lax) equivalence.