nullTerminatedPtrRange

Undocumented in source. Be warned that the author may not have intended to support it.
nullTerminatedPtrRange
(
E
)
(
E* ptr
)

Examples

t
{
	void test(S)(S s)
	{
		import std.utf : byCodeUnit;
		import std.algorithm.comparison : equal;
		assert(equal(s.byCodeUnit, s.ptr.nullTerminatedPtrRange));
	}
	// String literals are null-terminated
	test("foo");
	test("foo"w);
	test("foo"d

Meta