Extract the /24 subnet string from an IPv4 address. Returns null for IPv6 or malformed addresses.
/24
null
subnetKey("192.168.1.123") // → "192.168.1" Copy
subnetKey("192.168.1.123") // → "192.168.1"
Extract the
/24subnet string from an IPv4 address. Returnsnullfor IPv6 or malformed addresses.