System.TMarshal.AllocStringAsUtf8

提供: RAD Studio API Documentation
移動先: 案内検索

Delphi

class function AllocStringAsUtf8(const Str: string): TPtrWrapper; overload;
class function AllocStringAsUtf8(S: PWideChar): TPtrWrapper; overload;

プロパティ

種類 可視性 ソース ユニット
function public System.pas System TMarshal

説明

文字列をバッファにコピーします。

AllocStringAsUtf8 メソッドは、Str のコピーを格納したバッファを参照する、ラップ ポインタを返しますが、この Str は、デフォルトのシングルバイト エンコーディングでエンコードされ、null で終了します。 バッファは、Flush が呼び出されるか、レコードがスコープの外にでた際に、解放されます。


関連項目