Name

IP::ToHex — Converts IPv4 address from string to hex format

Synopsis

Import IP;
string IP::ToHex ( string  ip );

Parameters

string ip

IPv4 address as string in "ipv4" format

Return Value

string

representing IP in Hex

Examples

  IP::ToHex("192.168.1.1") -> "0xC0A80101"
  IP::ToHex("10.10.0.1") -> "0x0A0A0001"