A postblit is present on this object, but not explicitly documented in the source.
Copies data into an array of the same length using memcpy C routine. Shrinks the length to 0.
Return a slice to n more elements.
Reserve n more elements.
auto buf = scopedBuffer!char; buf.put('c'); buf.put("str"); assert(buf.data == "cstr"); buf.popBackN(2); assert(buf.data == "cs");
immutable
auto buf = scopedBuffer!(immutable char); buf.put('c'); buf.put("str"); assert(buf.data == "cstr"); buf.popBackN(2); assert(buf.data == "cs");
The buffer uses stack memory and C Runtime to allocate temporal memory.
Shouldn't store references to GC allocated data.