UriParser.isValidIPv6

bool isValidIPv6(string h) @safe

Validate an IPv6 address literal.

Enforces RFC 3986 group counting: an embedded IPv4 tail counts as two h16 groups, an uncompressed address has exactly 8 groups, and a `::` compression must stand for at least one zero group (7 explicit at most). Lone leading/trailing colons and `:::` are rejected.

Parameters

hIPv6 address string (no brackets, no zone id).

Returns

true if valid, false otherwise.