is_ip_address


Description:

public bool is_ip_address (string hostname)

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).

Parameters:

hostname

a hostname (or IP address in string form)

Returns:

true if hostname is an IP address


Namespace: GLib.Hostname
Package: glib-2.0