Function BasicString.ptr

Return pointer to the first element.

inout inout(BasicString.CharType)* ptr() pure nothrow @nogc @property @system;

The pointer returned may be invalidated by further calls to other member functions that modify the object.

Examples

BasicString!char str = "123";
char* ptr = str.ptr;
assert(ptr[0 .. 3] == "123");