Expand description
prettify_ip - parse and pretty-print IP addresses in canonical and non-canonical forms.
Supported formats:
- Standard IPv4 & IPv6 (RFC-compliant).
- IPv6 decimal dotted: 16 decimal octets separated by
.. - IPv4 decimal integer: decimal string representing a 32-bit integer.
- IPv4 hex: hex string (with or without
0xprefix).
Enums§
- Parse
IpError - Errors returned by parsing helpers.
Functions§
- ipv6_
to_ decimal_ dotted - Converts an IPv6 address to decimal-dotted notation (16 decimal octets separated by dots).
- parse_
ipv4_ from_ hex - Parses an IPv4 address from a hexadecimal string (with or without
0xprefix). - parse_
ipv4_ from_ u32_ decimal - Parses an IPv4 address from a decimal integer string (e.g.,
"3232235777"). - parse_
ipv6_ decimal_ dotted - Parses an IPv6 address from a decimal-dotted format (16 decimal octets separated by dots).
- parse_
maybe_ ip - Attempts to parse an IP address from a string using multiple strategies:
- to_
expanded_ ipv6 - Formats an IPv6 address in fully expanded hexadecimal notation (e.g.,
2001:0db8:0000:0000:0000:0000:0000:0001).