cmpCStrings

Compare C strings lexicographically.

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

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

Examples

t
{
	assert(cmpCStrings("ab".ptr, "ab".ptr) == 0);
	assert(cmpCStrings("ab".ptr, "abc".ptr) < 0);
	assert(cmpCStrings("abc".ptr, "ab".ptr) > 0

Meta