toIPAddressV4OrNull

@JvmStatic
@JvmName(name = "getOrNull")
fun String.toIPAddressV4OrNull(): 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 or null if no IPv4 address is found.


@JvmStatic
@JvmName(name = "getOrNull")
fun ByteArray.toIPAddressV4OrNull(): IPAddress.V4?(source)

Convert network ordered bytes to an IPv4 address.

Return

IPAddress.V4 or null if array size is not 4.