Pfx.trim
You're seeing just the function
trim
, go back to Pfx module for more information.
Specs
Trims all trailing 0
's from given prefix
.
Examples
iex> trim("255.255.255.0")
"255.255.255.0/24"
# perhaps more visible like this
iex> trim("255.255.255.0")
...> |> new()
%Pfx{bits: <<255, 255, 255>>, maxlen: 32}
iex> trim("10.10.128.0/30")
"10.10.128.0/17"
iex> trim({255, 255, 255, 0})
{255, 255, 255, 0}
iex> trim({{255, 255, 255, 0}, 32})
{{255, 255, 255, 0}, 24}
iex> trim("acdc:1976::ff00/128")
"acdc:1976::ff00/120"