Functions
The following functions are available globally.
-
This is a factory for IP addresses (as Strings).
Declaration
Swift
public func RVS_IPAddressExtractIPAddress(_ inString: String, isPadded inIsPadded: Bool = false) -> RVS_IPAddress!
Parameters
inString
The string to be parsed.
isPadded
Optional IPv6 padding variable. If true (default is false), then IPv6 addresses will be fully padded. Ignored for IPv4.
Return Value
a valid IPv4 or IPv6 address object. nil, if the String cannot produce a valid IP address.
-
This is a factory for IP addresses (as Int Arrays).
Declaration
Swift
public func RVS_IPAddressExtractIPAddress(array inArray: [Int], port inPort: Int = 0, isPadded inIsPadded: Bool = false) -> RVS_IPAddress!
Parameters
array
The Array to be used.
port
An optional (default is 0 -no port) Int, with the TCP port.
isPadded
Optional IPv6 padding variable. If true (default is false), then IPv6 addresses will be fully 0-padded (no shortcuts). Ignored for IPv4.
Return Value
a valid IPv4 or IPv6 address object. nil, if the Array cannot produce a valid IP address.