true if it matches the heuristic, false otherwise.bool isIPv6Literal(const string h) @nogc nothrow @safeReturns true if h looks like an IPv6 literal.
IPv6 addresses always contain colons. IPv4-mapped IPv6 addresses like ::ffff:192.0.2.1 contain both colons and dots but are still IPv6.
This heuristic checks for the presence of colons, which is the defining characteristic of IPv6.
h | Host string (without brackets). |
true if it matches the heuristic, false otherwise.