The OpenD Programming Language

CharzBuffer

Alternative for toStringz

Constructors

this
this(char[] data)

Copies data into the CharzBuffer, allocating a new one if needed, and zero-terminates it.

Postblit

A postblit is present on this object, but not explicitly documented in the source.

Members

Functions

copyInto
void copyInto(R r)

Copies it into a static array of chars

length
size_t length()

Length of the string, excluding the zero terminator.

slice
char[] slice()

Returns the slice of the internal buffer, excluding the zero terminator (though there is one present right off the end of the slice). You must assume its lifetime is less than that of the CharzBuffer.

Meta

History

Added March 18, 2023 (dub v11.0)