AddressRange.contains

Checks if the given address is in this range.

struct AddressRange
bool
contains
(
Address address
)

Parameters

address Address

an address of ip version 4 or 6

Return Value

Type: bool

true if it's in the range, false otherwise

Examples

auto range = AddressRange.parse("192.168.0-64.*");
assert(range.contains(new InternetAddress("192.168.0.1"), 0));
assert(range.contains(new InternetAddress("192.168.64.255"), 0));
assert(range.contains(new InternetAddress("192.168.255.255"), 0));

Meta