pstr method

PSTR pstr(
  1. String string
)

Creates a null-terminated ANSI string (PSTR) from a Dart string whose lifetime is bound to this Arena.

The string is allocated using the arena allocator and freed automatically when the arena is disposed.

Use this helper for Win32 APIs that take mutable ANSI strings (PSTR).

Implementation

PSTR pstr(String string) => string.toPstr(allocator: this);