parse_scheme_len

Function parse_scheme_len 

Source
pub fn parse_scheme_len(s: &str) -> Result<(usize, &str), Error>
Expand description

Parses the scheme length from the prefix of s.

The scheme will be valid but may have uppercase chars.

Returns Ok(scheme_len, rest_of_s). The rest_of_s starts after the ://. Returns Err(InvalidScheme) if the scheme or :// postfix is invalid.