equalCStrings

Returns whether two C strings are equal.

Preconditions: cstr1 != null && cstr2 != null

@property pure nothrow @nogc
bool
equalCStrings
(
C
)
(
in C* cstr1
,
in C* cstr2
)
if (
isSomeChar!C
)

Examples

t
{
	assert( equalCStrings("ab".ptr, "ab".ptr));
	assert(!equalCStrings("ab".ptr, "abc".ptr));
	assert( equalCStrings("ab".ptr, "ab\0cd".ptr)

Meta