pcstr method

PCSTR pcstr(
  1. String string
)

Creates a null-terminated ANSI string (PCSTR) 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 read-only ANSI strings (PCSTR).

Implementation

PCSTR pcstr(String string) => string.toPcstr(allocator: this);