Hostname.isIpAddress

Tests if hostname is the string form of an IPv4 or IPv6 address. (Eg, "192.168.0.1".)

struct Hostname
static
bool
isIpAddress
(
string hostname
)

Parameters

hostname string

a hostname (or IP address in string form)

Return Value

Type: bool

TRUE if hostname is an IP address

Meta

Since

2.22