Address4.opCmp

Compares two Address4 objects.

  1. int opCmp(Address4 that)
    struct Address4
    const @nogc nothrow pure @safe
    int
    opCmp
    (
    ref const Address4 that
    )
  2. int opCmp(Address4 that)

Parameters

that Address4

Another address.

Return Value

Type: int

Positive number if $(D_KEYWORD this) is larger than that, negative - if it is smaller, or 0 if they equal.

Examples

assert(address4("127.0.0.1").get > address4("126.0.0.0").get);
assert(address4("127.0.0.1").get < address4("127.0.0.2").get);
assert(address4("127.0.0.1") == address4("127.0.0.1"));

Meta