pstrBuffer method

PSTR pstrBuffer([
  1. int length = 1
])

Allocates a mutable ANSI string buffer (PSTR) with capacity for length characters, including the terminating NUL character.

This is intended for Win32 APIs that write into caller-provided ANSI buffers.

The buffer is owned by the arena and freed automatically when the arena is disposed.

Implementation

PSTR pstrBuffer([int length = 1]) => .new(allocate<BYTE>(length).cast());