is_v4
Checks whether an IP address has version number 4.
is_v4(x:ip) -> bool
Description
Section titled “Description”The ipv4
function checks whether the version number of a given IP address x
is 4.
Examples
Section titled “Examples”Check if an IP is IPv4
Section titled “Check if an IP is IPv4”from { x: 1.2.3.4.is_v4(), y: ::1.is_v4(),}
{ x: true, y: false,}