R/string.R
is_ipv6.Rd
Validates full, compressed (::) and IPv4-embedded (::ffff:192.168.1.1) forms. Zone IDs (e.g. %eth0) are not supported.
::
::ffff:192.168.1.1
%eth0
is_ipv6(x)
(any) Object to check.
any
TRUE if x is a valid IPv6 address string, FALSE otherwise.
TRUE
x
FALSE
is_ipv6("2001:0db8:85a3:0000:0000:8a2e:0370:7334") #> [1] TRUE is_ipv6("::1") #> [1] TRUE