help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Classes][Procedures and functions][Variables] Reference for unit 'sysutils' (#rtl)

StrAlloc

Allocate a null-terminated string on the heap.

Declaration

Source position: syspchh.inc line 47

function StrAlloc(

  Size: cardinal

):PChar;

Description

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

Additionally, StrAlloc allocates 4 extra bytes to store the size of the allocated memory. Therefore this function is NOT compatible with the StrAlloc function of the Strings unit.

For an example, see StrBufSize.

Errors

None.

See also

StrBufSize

  

Return the size of a null-terminated string allocated on the heap.

StrDispose

  

Dispose of a null-terminated string on the heap.

StrAlloc

  

Allocate a null-terminated string on the heap.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505