Sign in Join
FPDoc Onlineexperiment

stralloc function

In unit Strings

Allocate memory for a new null-terminated string on the heap.

Declaration

pascal
function stralloc(L: SizeInt): PAnsiChar

Description

StrAlloc reserves memory on the heap for a string with length Len, terminating #0 included, and returns a pointer to it.

Errors

If there is not enough memory, a run-time error occurs.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.