equal

Undocumented in source. Be warned that the author may not have intended to support it.
  1. bool equal(T a, U b)
    bool
    equal
    (
    T
    U
    )
    (
    scope T a
    ,
    scope U b
    )
    if (
    !(
    isInfinite!T &&
    isInfinite!U
    )
    )
  2. bool equal(const(T)[] a, const(U)[] b)

Examples

dynamic arrays

assert(!equal([1, 2   ].s[], [1, 2, 3].s[]));
assert(!equal([1, 2, 3].s[], [1, 2,  ].s[]));
assert( equal([1, 2, 3].s[], [1, 2, 3].s[]));

static arrays

assert(!equal([1, 2   ].s, [1, 2, 3].s));
assert(!equal([1, 2, 3].s, [1, 2,  ].s));
assert( equal([1, 2, 3].s, [1, 2, 3].s));

Meta