Skip to main content

is_uri_like

Function is_uri_like 

Source
fn is_uri_like(s: &str) -> bool
Expand description

True if s, ignoring leading whitespace, begins with a valid URI scheme followed by :// (scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )). Leading whitespace (including Unicode, e.g. U+2003) does not stop a value from being a URI, so it is trimmed first; a bare contains("://") would instead misfire on a :// inside a keyword value.