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



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

NewStr

Allocate a new ansistring on the heap.

Declaration

Source position: sysstrh.inc line 65

function NewStr(

  const S: String

):PString;

Description

NewStr assigns a new dynamic string on the heap, copies S into it, and returns a pointer to the newly assigned string.

This function is obsolete, and shouldn't be used any more. The AnsiString mechanism also allocates ansistrings on the heap, and should be preferred over this mechanism.

For an example, see AssignStr.

Errors

If not enough memory is present, an EOutOfMemory exception will be raised.

See also

AssignStr

  

Assigns an ansistring to a null-terminated string.

DisposeStr

  

Dispose an ansistring from the heap.

Notes

 No notes exist for this page yet. 





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