# dns/parse Parse an IP literal into its canonical string form. ## Syntax
[dns/parse $s]
## Parameters - `$s` — an IPv4 or IPv6 literal (string) ## Examples
[dns/parse "0:0:0:0:0:0:0:1"]
# => "::1"

[dns/parse "127.0.0.1"]
# => "127.0.0.1"

[dns/parse "::ffff:1.2.3.4"]
# => "::ffff:1.2.3.4"

[dns/parse "localhost"]
# => %Err{ :message "dns/parse: invalid IP address" }
## Returns Canonical address string, or `%Err{:message}`. IPv6 is shortened to the longest zero run; no port is included. ## See Also `dns/ip?`, `dns/ipv4?`, `dns/ipv6?`, `dns/lookup`