def parse

bend-kit-netip@0.1.0.0 · netip.bend:244

import bend-kit-netip@0.1.0.0/netip.bend as Netip
import Base

244# Strict address text: 4 dotted-decimal octets, or RFC 4291 IPv6 with at most one "::" and an optional
245# trailing dotted IPv4. No brackets, zones, ports, or surrounding space.
246def parse(+s: String) -> Maybe<&2, Addr>:
247  parse.fam(String.contains(s, ":"), s)

Uses (5)

Used by (1)