System.SysUtils.TMarshaller.AllocStringAsUtf8
Delphi
function AllocStringAsUtf8(const Str: string): TPtrWrapper; overload;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.SysUtils.pas | System.SysUtils | TMarshaller |
Description
Copies a string into a buffer.
The AllocStringAsUtf8 method returns a wrapped pointer referencing a buffer containing a copy of Str
encoded in the default single byte encoding, with a null terminator. The buffer will be freed when Flush is called or the record goes out of scope.