equal

Compares two memory areas r1 and r2 for equality.

@nogc nothrow pure @trusted
bool
equal
(
const void[] r1
,
const void[] r2
)

Parameters

r1 void[]

First memory block.

r2 void[]

Second memory block.

Return Value

Type: bool

$(D_KEYWORD true) if r1 and r2 are equal, $(D_KEYWORD false) otherwise.

Examples

t
{
    assert(equal("asdf", "asdf"));
    assert(!equal("asd", "asdf"));
    assert(!equal("asdf", "asd"));
    assert(!equal("asdf", "qwer")

Meta