System.WideStrUtils.WStrNew

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

Delphi

function WStrNew(const Str: PWideChar): PWideChar;

C++

extern DELPHI_PACKAGE System::WideChar * __fastcall WStrNew(const System::WideChar * Str);

プロパティ

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

説明

PWideChar を新たに割り当てたヒープにコピーし、新しい PWideChar を返します。

WStrNewStr のコピーをヒープ上に割り当てます。

Strnil (Delphi)や NULL (C++)または空の文字列へのポインタである場合は、WStrNew は新しい空の PWideChar へのポインタを返します。

該当しない場合は、WStrNewStr を複製します。つまり WStrAlloc への呼び出しにより領域が確保され、複製された PWideChar へのポインタが返ります。

割り当て領域は Str * 2 + 5 バイトの長さです。

関連項目