pub fn hostname_is_ip_address(hostname: &str) -> boolExpand description
Tests if @hostname is the string form of an IPv4 or IPv6 address. (Eg, “192.168.0.1”.)
Since 2.66, IPv6 addresses with a zone-id are accepted (RFC6874).
Note that this function only checks the syntax. It does not guarantee that
the string will be accepted by the current OS and in particular by
gio::InetAddress::new_from_string().
§hostname
a hostname (or IP address in string form)
§Returns
true if @hostname is an IP address