Jump to content

Canonicalize CIDR: Difference between revisions

m
(Added Wren)
Line 43:
function canonCIDR(cidr::String)
ip = split(cidr, "/")
ip4dig = IPv4length(UInt64ip) > 1 ? 2^(IPv432 - parse(UInt64, ip[12])) &: 0xfffffefe)1
return length(ip)ip4 == 1 ? "$ip4" : "$ip4/$IPv4(UInt64(IPv4(ip[21])") & #(0xffffffff return- asdig a+ string1))
return length(ip) == 1 ? "$ip4" : "$ip4/$(ip[2])"
end
 
Line 52 ⟶ 53:
87.70.140.0/22
</pre>
 
 
=={{header|Perl}}==
4,108

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.