LOG IN SIGN UP
Documentation

std.str2ip()

Converts the string address to an IP address (IPv4 or IPv6). If conversion fails, the fallback will be returned. Note that only the first result from DNS resolution is returned.

Format

IP
std.str2ip(STRING addr, STRING fallback)

Examples

1
2
3
if (std.str2ip("192.0.2.1", "192.0.2.2") ~ my_acl) {
  ...
}