It would be useful to have something that validates and encodes/decodes ipv6 addresses, somewhat similar to the way $longip() handles ipv4's.

Perhaps something that takes $longipv6(string, [e|d]) and either encodes a 128-bit number into the compressed format, or decodes vice versa.

A useful feature would be to use it to validate if a string is a valid ipv6 string by $longipv6(string,d).validate returning $null if it's invalid, or $true/$false. The regex to match ipv6 addresses is very long and complex.