StrNew (function) (Strings unit)

Language:
Русский
English

 StrNew (function)     (Strings unit)


Allocates a string on the heap.

Declaration

 function StrNew(Str: PChar): PChar;;

Target

Windows

Remarks

StrNew allocates a copy of Str on the heap.

If Str is nil or points to an empty string, StrNew returns nil and does not allocate any heap space.

Otherwise, StrNew makes a duplicate of Str, obtaining space with a call to the GetMem standard procedure, and returns a pointer to the duplicated string.

The allocated space is StrLen(Str) + 1 bytes long.

See Also

Тэги: StrNew
| G+
Код для вставки: :: :: :: ::
Поделиться: // //