Function ipv4

Source
pub fn ipv4(ip: &str) -> bool
Expand description

Checks whether the given string is a valid IPv4 address.

ยงExample

if dator::ipv4("0.0.0.0") {
    // 0.0.0.0 is a valid IPv4
}
if !dator::ipv4("fe80::") {
    // fe80:: is an invalid IPv4
}