CanonicalizeIPAddress (open)

Convert an IP address to its shortest, least ambiguous format

Syntax

LOADLIB "wh::internet/tcpip.whlib";

STRING FUNCTION CanonicalizeIPAddress(STRING address, BOOLEAN with_prefixlength)

Parameters

STRING address

IP address to canonicalizer

BOOLEAN with_prefixlength

If true, the input address may have a prefix length, and the output address will

Return value

STRING

The canonical ip address. An empty string if the ip address or prefix length is invalid