pub fn trim_host(path: &str) -> &str {
	if path.contains('[') && path.contains(']') {
		match path.rfind("]:") {
			Some(i) => return &path[i+1..],
			None => return "",
		};
	}

	match path.rfind(':') {
		Some(i) => &path[i..],
		None => "",
	}
}
// Trim the host from an IPv4 address, IPv6 address, or domain:port.
Trim the host from an IPv4 address, IPv6 address, or domain:port.
Trim the host from an IPv4 address IPv6 address or domain : port .
pub fn trim_host(path: &str) -> &str {
	if path.contains('[') && path.contains(']') {
		match path.rfind("]:") {
			Some(i) => return &path[i+1..],
			None => return "",
		};
	}
	match path.rfind(':') {
		Some(i) => &path[i..],
		None => "",
	}
}
pub fn trim_host ( path : & str ) -> & str { if path . contains ( '[' ) && path . contains ( ']' ) { match path . rfind ( " " ) { Some ( i ) => return & path [ i + 1 .. ] , None => return " " , } ; } match path . rfind ( ':' ) { Some ( i ) => & path [ i .. ] , None => " " , } }
Trim the host from an IPv4 address, IPv6 address, or domain:port.
Trim the host from an IPv4 address IPv6 address or domain : port .
path
&str
path
&str