toIPAddressV4

@JvmStatic
@JvmName(name = "get")
fun String.toIPAddressV4(): IPAddress.V4(source)

Parses a String for its IPv4 address.

String can be either a URL containing the IPv4 address, or the IPv4 address itself.

Return

IPAddress.V4

Throws

IllegalArgumentException

if no IPv4 address is found.


@JvmStatic
@JvmName(name = "get")
fun ByteArray.toIPAddressV4(): IPAddress.V4(source)

Convert network ordered bytes to an IPv4 address.

Return

IPAddress.V4

Throws

IllegalArgumentException

if array size is not 4.