Skip to main content

format_url

Function format_url 

Source
fn format_url(url: String) -> Option<String>
Expand description

Reproduces Node CLI’s formatUrl from default-environment.service.ts: empty input collapses to None, trailing slashes are stripped, https:// is prepended when no scheme is present, and surrounding whitespace is trimmed.